File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/langtrace_python_sdk/utils Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class FetchOptions(TypedDict, total=False):
2727def 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 } " ,
You can’t perform that action at this time.
0 commit comments