From 6d4a426059ff6126c47bc9f3a0a7f5a9b2505b2f Mon Sep 17 00:00:00 2001 From: Andrew Nguonly Date: Tue, 8 Oct 2024 12:44:37 -0700 Subject: [PATCH] sdk-py: Add `custom` stream mode to `StreamMode` type (#2051) ### Summary The LangGraph API supports `custom` stream mode type. Reference: https://github.com/langchain-ai/langgraph/blob/main/docs/docs/cloud/reference/api/openapi.json#L2403 --- libs/sdk-py/langgraph_sdk/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index bc7bf558e..19014a76c 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -25,7 +25,7 @@ Represents the status of a thread: - "interrupted": The thread's execution was interrupted. """ -StreamMode = Literal["values", "messages", "updates", "events", "debug"] +StreamMode = Literal["values", "messages", "updates", "events", "debug", "custom"] """ Defines the mode of streaming: - "values": Stream only the values. @@ -33,6 +33,7 @@ Defines the mode of streaming: - "updates": Stream updates to the state. - "events": Stream events occurring during execution. - "debug": Stream detailed debug information. +- "custom": Stream custom events. """ DisconnectMode = Literal["cancel", "continue"]