Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/langtrace_python_sdk/utils/prompt_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class FetchOptions(TypedDict, total=False):
def get_prompt_from_registry(
prompt_registry_id: str,
options: Optional[FetchOptions] = None,
api_key: Optional[str] = None,
) -> LangtracePrompt:
"""Fetches a prompt from the registry.

Expand All @@ -52,8 +53,8 @@ def get_prompt_from_registry(
query_params[f"variables.{key}"] = value
# Encode the query parameters
query_string = urlencode(query_params, doseq=True)
headers = {"x-api-key": os.environ["LANGTRACE_API_KEY"]}
print(query_params)
headers = {"x-api-key": api_key or os.environ["LANGTRACE_API_KEY"]}

# Make the GET request to the API
response = requests.get(
f"{os.environ['LANGTRACE_API_HOST']}/api/promptset?{query_string}",
Expand Down
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.1.27"
__version__ = "2.1.28"