Skip to content

Commit 1a9e028

Browse files
committed
Merge branch 'development' of github.com:Scale3-Labs/langtrace-python-sdk into ali/s3en-2466-migrate-to-otel-genai-spec
2 parents aa374ca + 7685e54 commit 1a9e028

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/langtrace_python_sdk/utils/prompt_registry.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class FetchOptions(TypedDict, total=False):
2727
def get_prompt_from_registry(
2828
prompt_registry_id: str,
2929
options: Optional[FetchOptions] = None,
30+
api_key: Optional[str] = None,
3031
) -> LangtracePrompt:
3132
"""Fetches a prompt from the registry.
3233
@@ -52,8 +53,8 @@ def get_prompt_from_registry(
5253
query_params[f"variables.{key}"] = value
5354
# Encode the query parameters
5455
query_string = urlencode(query_params, doseq=True)
55-
headers = {"x-api-key": os.environ["LANGTRACE_API_KEY"]}
56-
print(query_params)
56+
headers = {"x-api-key": api_key or os.environ["LANGTRACE_API_KEY"]}
57+
5758
# Make the GET request to the API
5859
response = requests.get(
5960
f"{os.environ['LANGTRACE_API_HOST']}/api/promptset?{query_string}",

0 commit comments

Comments
 (0)