Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Dec 3, 2024
1 parent 3cee1d5 commit 3bf92d0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libs/sdk-py/langgraph_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', "
Expand Down Expand Up @@ -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', "
Expand Down

0 comments on commit 3bf92d0

Please sign in to comment.