mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-08 10:47:52 +02:00
Merge branch 'main' into v1
This commit is contained in:
@@ -41,7 +41,7 @@ from langgraph._internal._constants import (
|
||||
NS_SEP,
|
||||
)
|
||||
from langgraph.checkpoint.base import CheckpointMetadata
|
||||
from langgraph.errors import GraphInterrupt
|
||||
from langgraph.errors import GraphInterrupt, ParentCommand
|
||||
from langgraph.pregel.protocol import PregelProtocol, StreamProtocol
|
||||
from langgraph.types import (
|
||||
All,
|
||||
@@ -680,6 +680,9 @@ class RemoteGraph(PregelProtocol):
|
||||
ns = tuple(ns_.split(NS_SEP))
|
||||
else:
|
||||
mode, ns = chunk.event, ()
|
||||
# raise ParentCommand exception for command events
|
||||
if mode == "command" and chunk.data.get("graph") == Command.PARENT:
|
||||
raise ParentCommand(Command(**chunk.data))
|
||||
# prepend caller ns (as it is not passed to remote graph)
|
||||
if caller_ns := (config or {}).get(CONF, {}).get(CONFIG_KEY_CHECKPOINT_NS):
|
||||
caller_ns = tuple(caller_ns.split(NS_SEP))
|
||||
@@ -779,6 +782,9 @@ class RemoteGraph(PregelProtocol):
|
||||
ns = tuple(ns_.split(NS_SEP))
|
||||
else:
|
||||
mode, ns = chunk.event, ()
|
||||
# raise ParentCommand exception for command events
|
||||
if mode == "command" and chunk.data.get("graph") == Command.PARENT:
|
||||
raise ParentCommand(Command(**chunk.data))
|
||||
# prepend caller ns (as it is not passed to remote graph)
|
||||
if caller_ns := (config or {}).get(CONF, {}).get(CONFIG_KEY_CHECKPOINT_NS):
|
||||
caller_ns = tuple(caller_ns.split(NS_SEP))
|
||||
|
||||
@@ -6958,4 +6958,4 @@ def test_subgraph_to_end_does_not_warn() -> None:
|
||||
graph = builder.compile()
|
||||
|
||||
response = graph.invoke({"x": "hello"})
|
||||
print(response)
|
||||
assert response == {"x": "hello!"}
|
||||
|
||||
Generated
+1
-1
@@ -1481,7 +1481,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "langgraph-sdk"
|
||||
version = "0.1.73"
|
||||
version = "0.1.74"
|
||||
source = { editable = "../sdk-py" }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
|
||||
Generated
+1
-1
@@ -507,7 +507,7 @@ dev = [
|
||||
|
||||
[[package]]
|
||||
name = "langgraph-sdk"
|
||||
version = "0.1.73"
|
||||
version = "0.1.74"
|
||||
source = { editable = "../sdk-py" }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
|
||||
@@ -247,7 +247,7 @@ class Thread(TypedDict):
|
||||
values: Json
|
||||
"""The current state of the thread."""
|
||||
interrupts: dict[str, list[Interrupt]]
|
||||
"""Interrupts which were thrown in this thread"""
|
||||
"""Mapping of task ids to interrupts that were raised in that task."""
|
||||
|
||||
|
||||
class ThreadTask(TypedDict):
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "langgraph-sdk"
|
||||
version = "0.1.73"
|
||||
version = "0.1.74"
|
||||
description = "SDK for interacting with LangGraph API"
|
||||
authors = []
|
||||
requires-python = ">=3.9"
|
||||
|
||||
Generated
+1
-1
@@ -119,7 +119,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "langgraph-sdk"
|
||||
version = "0.1.73"
|
||||
version = "0.1.74"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
|
||||
Reference in New Issue
Block a user