File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/orq-rc/src/orq_ai_sdk/langchain Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def log_event(self, event: LlmEvent):
62
62
"Authorization" : f"Bearer { self .api_key } "
63
63
}
64
64
65
- response = httpx .post (f"{ self .api_url } /v2/traces/langchain" , headers = headers , json = event .model_dump ())
65
+ httpx .post (f"{ self .api_url } /v2/traces/langchain" , headers = headers , json = event .model_dump ())
66
66
67
67
class OrqLangchainCallback (BaseCallbackHandler ):
68
68
"""Base callback handler that can be used to handle callbacks from langchain."""
@@ -110,13 +110,14 @@ def on_chat_model_start(
110
110
"kwargs" : kwargs ,
111
111
}, messages = normalize_messages , run_id = str (run_id ))
112
112
113
+ # pylint: disable=unused-argument
113
114
def on_llm_end (
114
115
self ,
115
116
response : LLMResult ,
116
117
* ,
117
118
run_id : UUID ,
118
119
parent_run_id : Optional [UUID ] = None ,
119
- ** kwargs : Any ,
120
+ ** kwargs : Any
120
121
) -> Any :
121
122
event : LlmEvent = self .events [str (run_id )]
122
123
event .end_timestamp = get_iso_string ()
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def log_event(self, event: LlmEvent):
62
62
"Authorization" : f"Bearer { self .api_key } "
63
63
}
64
64
65
- response = httpx .post (f"{ self .api_url } /v2/traces/langchain" , headers = headers , json = event .model_dump ())
65
+ httpx .post (f"{ self .api_url } /v2/traces/langchain" , headers = headers , json = event .model_dump ())
66
66
67
67
class OrqLangchainCallback (BaseCallbackHandler ):
68
68
"""Base callback handler that can be used to handle callbacks from langchain."""
@@ -110,13 +110,14 @@ def on_chat_model_start(
110
110
"kwargs" : kwargs ,
111
111
}, messages = normalize_messages , run_id = str (run_id ))
112
112
113
+ # pylint: disable=unused-argument
113
114
def on_llm_end (
114
115
self ,
115
116
response : LLMResult ,
116
117
* ,
117
118
run_id : UUID ,
118
119
parent_run_id : Optional [UUID ] = None ,
119
- ** kwargs : Any ,
120
+ ** kwargs : Any
120
121
) -> Any :
121
122
event : LlmEvent = self .events [str (run_id )]
122
123
event .end_timestamp = get_iso_string ()
You can’t perform that action at this time.
0 commit comments