From 3bf92d0b031e7f2a54cf51d28d51ebcb3f04cf2e Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Tue, 3 Dec 2024 11:04:28 -0800 Subject: [PATCH] Fix --- libs/sdk-py/langgraph_sdk/client.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libs/sdk-py/langgraph_sdk/client.py b/libs/sdk-py/langgraph_sdk/client.py index 3fbf61041..d6c5b6f05 100644 --- a/libs/sdk-py/langgraph_sdk/client.py +++ b/libs/sdk-py/langgraph_sdk/client.py @@ -298,9 +298,7 @@ async def stream( logger.error(f"Error from langgraph-api: {body}", exc_info=e) raise e # check content type - content_type = self._response.headers.get("content-type", "").partition( - ";" - )[0] + content_type = res.headers.get("content-type", "").partition(";")[0] if "text/event-stream" not in content_type: raise httpx.TransportError( "Expected response header Content-Type to contain 'text/event-stream', " @@ -2447,9 +2445,7 @@ def stream( logger.error(f"Error from langgraph-api: {body}", exc_info=e) raise e # check content type - content_type = self._response.headers.get("content-type", "").partition( - ";" - )[0] + content_type = res.headers.get("content-type", "").partition(";")[0] if "text/event-stream" not in content_type: raise httpx.TransportError( "Expected response header Content-Type to contain 'text/event-stream', "