From 6aef3e0117ede8449983ccf9de879ed66dde5bbf Mon Sep 17 00:00:00 2001 From: jacoblee93 Date: Mon, 30 Dec 2024 10:29:01 -0800 Subject: [PATCH] Update Python types too --- libs/sdk-py/langgraph_sdk/schema.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index 6237ea5bd..c710660ee 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -1,7 +1,17 @@ """Data models for interacting with the LangGraph API.""" from datetime import datetime -from typing import Any, Dict, Literal, NamedTuple, Optional, Sequence, TypedDict, Union +from typing import ( + Any, + Dict, + Literal, + NamedTuple, + Optional, + Sequence, + Tuple, + TypedDict, + Union, +) Json = Optional[dict[str, Any]] """Represents a JSON-like structure, which can be None or a dictionary with string keys and any values.""" @@ -374,5 +384,5 @@ class Send(TypedDict): class Command(TypedDict, total=False): goto: Union[Send, str, Sequence[Union[Send, str]]] - update: dict[str, Any] + update: Union[dict[str, Any], Sequence[Tuple[str, Any]]] resume: Any