langgraph-api 0.2.23__py3-none-any.whl → 0.2.24__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of langgraph-api might be problematic. Click here for more details.

langgraph_api/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.2.23"
1
+ __version__ = "0.2.24"
langgraph_api/stream.py CHANGED
@@ -9,6 +9,7 @@ import structlog
9
9
  from langchain_core.messages import (
10
10
  BaseMessage,
11
11
  BaseMessageChunk,
12
+ convert_to_messages,
12
13
  message_chunk_to_message,
13
14
  )
14
15
  from langchain_core.runnables.config import run_in_executor
@@ -178,7 +179,11 @@ async def astream_state(
178
179
  else:
179
180
  yield "messages", chunk
180
181
  else:
181
- msg, meta = cast(tuple[BaseMessage, dict[str, Any]], chunk)
182
+ msg, meta = cast(
183
+ tuple[BaseMessage | dict, dict[str, Any]], chunk
184
+ )
185
+ if isinstance(msg, dict):
186
+ msg = convert_to_messages([msg])[0]
182
187
  if msg.id in messages:
183
188
  messages[msg.id] += msg
184
189
  else:
@@ -233,7 +238,11 @@ async def astream_state(
233
238
  else:
234
239
  yield "messages", chunk
235
240
  else:
236
- msg, meta = cast(tuple[BaseMessage, dict[str, Any]], chunk)
241
+ msg, meta = cast(
242
+ tuple[BaseMessage | dict, dict[str, Any]], chunk
243
+ )
244
+ if isinstance(msg, dict):
245
+ msg = convert_to_messages([msg])[0]
237
246
  if msg.id in messages:
238
247
  messages[msg.id] += msg
239
248
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langgraph-api
3
- Version: 0.2.23
3
+ Version: 0.2.24
4
4
  Summary:
5
5
  License: Elastic-2.0
6
6
  Author: Nuno Campos
@@ -1,5 +1,5 @@
1
1
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
2
- langgraph_api/__init__.py,sha256=drfF0qMRjoB2RacyqP-NkNmDOIBrys6RWHvqSTpZLuc,23
2
+ langgraph_api/__init__.py,sha256=n5ZPZHIaXZ7sqt8tjkjGM573cZdtdmlQuM7yyyEcMe0,23
3
3
  langgraph_api/api/__init__.py,sha256=YVzpbn5IQotvuuLG9fhS9QMrxXfP4s4EpEMG0n4q3Nw,5625
4
4
  langgraph_api/api/assistants.py,sha256=4_tZCXlOmFg-YwgtsCZPc1wr-3fexqJ6A3_2a5giF90,15811
5
5
  langgraph_api/api/mcp.py,sha256=RvRYgANqRzNQzSmgjNkq4RlKTtoEJYil04ot9lsmEtE,14352
@@ -85,7 +85,7 @@ langgraph_api/serde.py,sha256=TVsx2QQtepf8Wsgsabcku1NV4Vbugu4Oujmdnq4qMS0,3964
85
85
  langgraph_api/server.py,sha256=4P7GpXbE9m-sAV7rBQ4Gd3oFk6htNbL-tRQfICAFc2k,6837
86
86
  langgraph_api/sse.py,sha256=3jG_FZj8FI9r7xGWTqaAyDkmqf6P1NOu0EzGrcSOGYc,4033
87
87
  langgraph_api/state.py,sha256=8jx4IoTCOjTJuwzuXJKKFwo1VseHjNnw_CCq4x1SW14,2284
88
- langgraph_api/stream.py,sha256=4wKeoLuxqy7m7iamONmP9Lw4vcHEMWPeQFV_PrJC5AY,12042
88
+ langgraph_api/stream.py,sha256=vQXHb2f8g-VvTRjPcgq4MEQ2mR4tYdQ8nxr4V3ogQkQ,12433
89
89
  langgraph_api/thread_ttl.py,sha256=-Ox8NFHqUH3wGNdEKMIfAXUubY5WGifIgCaJ7npqLgw,1762
90
90
  langgraph_api/tunneling/cloudflare.py,sha256=iKb6tj-VWPlDchHFjuQyep2Dpb-w2NGfJKt-WJG9LH0,3650
91
91
  langgraph_api/utils.py,sha256=92mSti9GfGdMRRWyESKQW5yV-75Z9icGHnIrBYvdypU,3619
@@ -97,8 +97,8 @@ langgraph_license/validation.py,sha256=ZKraAVJArAABKqrmHN-EN18ncoNUmRm500Yt1Sc7t
97
97
  langgraph_runtime/__init__.py,sha256=O4GgSmu33c-Pr8Xzxj_brcK5vkm70iNTcyxEjICFZxA,1075
98
98
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
99
99
  openapi.json,sha256=h2zgGTQD9houdruwRdNwZuAFo-w3eP_f6huQ6jRFp84,133801
100
- langgraph_api-0.2.23.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
101
- langgraph_api-0.2.23.dist-info/METADATA,sha256=17XvJmMLdBhzcwrl06VdUWmqIFUgDbCb5_rUjfDrPwY,4275
102
- langgraph_api-0.2.23.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
103
- langgraph_api-0.2.23.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
104
- langgraph_api-0.2.23.dist-info/RECORD,,
100
+ langgraph_api-0.2.24.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
101
+ langgraph_api-0.2.24.dist-info/METADATA,sha256=Nz4lmXMHqUXie-N4bbZJW4uN6mqGWEpOtj8ZnP2ZtPE,4275
102
+ langgraph_api-0.2.24.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
103
+ langgraph_api-0.2.24.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
104
+ langgraph_api-0.2.24.dist-info/RECORD,,