Skip to content

Commit

Permalink
Merge pull request #2562 from langchain-ai/nc/27nov/revert-sdk
Browse files Browse the repository at this point in the history
Revert "sdk-py: Fix SSE parsing to split lines only \n \r \r\n per SSE spec"
  • Loading branch information
nfcampos authored Nov 28, 2024
2 parents 769f6a1 + 4576a25 commit 07ac016
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 110 deletions.
5 changes: 2 additions & 3 deletions libs/sdk-py/langgraph_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
ThreadStatus,
ThreadUpdateStateResponse,
)
from langgraph_sdk.sse import EventSource

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -293,7 +292,7 @@ async def stream(
else:
logger.error(f"Error from langgraph-api: {body}", exc_info=e)
raise e
async for event in EventSource(sse.response).aiter_sse():
async for event in sse.aiter_sse():
yield StreamPart(
event.event, orjson.loads(event.data) if event.data else None
)
Expand Down Expand Up @@ -2427,7 +2426,7 @@ def stream(
else:
logger.error(f"Error from langgraph-api: {body}", exc_info=e)
raise e
for event in EventSource(sse.response).iter_sse():
for event in sse.iter_sse():
yield StreamPart(
event.event, orjson.loads(event.data) if event.data else None
)
Expand Down
106 changes: 0 additions & 106 deletions libs/sdk-py/langgraph_sdk/sse.py

This file was deleted.

2 changes: 1 addition & 1 deletion libs/sdk-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-sdk"
version = "0.1.38"
version = "0.1.39"
description = "SDK for interacting with LangGraph API"
authors = []
license = "MIT"
Expand Down

0 comments on commit 07ac016

Please sign in to comment.