From 5c44dcef81f04b0996944105a3365a5180dd60cd Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Thu, 24 Oct 2024 18:16:21 +0200 Subject: [PATCH] fix(sdk): add error thread state --- libs/sdk-js/src/schema.ts | 2 +- libs/sdk-py/langgraph_sdk/schema.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/sdk-js/src/schema.ts b/libs/sdk-js/src/schema.ts index 979c198ef..c2de251f6 100644 --- a/libs/sdk-js/src/schema.ts +++ b/libs/sdk-js/src/schema.ts @@ -10,7 +10,7 @@ type RunStatus = | "timeout" | "interrupted"; -type ThreadStatus = "idle" | "busy" | "interrupted"; +type ThreadStatus = "idle" | "busy" | "interrupted" | "error"; type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue"; diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index 827c2e33a..3bc43f035 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -17,12 +17,13 @@ Represents the status of a run: - "interrupted": The run was manually stopped or interrupted. """ -ThreadStatus = Literal["idle", "busy", "interrupted"] +ThreadStatus = Literal["idle", "busy", "interrupted", "error"] """ Represents the status of a thread: - "idle": The thread is not currently processing any task. - "busy": The thread is actively processing a task. - "interrupted": The thread's execution was interrupted. +- "error": An exception occurred during task processing. """ StreamMode = Literal["values", "messages", "updates", "events", "debug", "custom"]