File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
tests/integrations/langchain Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 6767)
6868
6969LANGCHAIN_VERSION = package_version ("langchain" )
70+ LANGCHAIN_OPENAI_VERSION = package_version ("langchain-openai" )
7071
7172
7273@tool
@@ -187,12 +188,15 @@ def test_langchain_chat(
187188 )
188189 events = capture_events ()
189190
191+ request_headers = {}
192+ # Changed in https://github.com/langchain-ai/langchain/pull/32655
193+ if LANGCHAIN_OPENAI_VERSION >= (0 , 3 , 32 ):
194+ request_headers ["X-Stainless-Raw-Response" ] = "True"
195+
190196 model_response = get_model_response (
191197 nonstreaming_chat_completions_model_response ,
192198 serialize_pydantic = True ,
193- request_headers = {
194- "X-Stainless-Raw-Response" : "True" ,
195- },
199+ request_headers = request_headers ,
196200 )
197201
198202 llm = ChatOpenAI (
You can’t perform that action at this time.
0 commit comments