From 9a9fe2fdec6cfba92ad285b35d820b656b3721fe Mon Sep 17 00:00:00 2001 From: jacoblee93 Date: Mon, 30 Dec 2024 10:14:51 -0800 Subject: [PATCH 1/4] Update JS SDK command types --- libs/sdk-js/package.json | 2 +- libs/sdk-js/src/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sdk-js/package.json b/libs/sdk-js/package.json index 8e3e061b2..727faaec0 100644 --- a/libs/sdk-js/package.json +++ b/libs/sdk-js/package.json @@ -1,6 +1,6 @@ { "name": "@langchain/langgraph-sdk", - "version": "0.0.32", + "version": "0.0.33", "description": "Client library for interacting with the LangGraph API", "type": "module", "packageManager": "yarn@1.22.19", diff --git a/libs/sdk-js/src/types.ts b/libs/sdk-js/src/types.ts index 6a668ef4c..5afd3123a 100644 --- a/libs/sdk-js/src/types.ts +++ b/libs/sdk-js/src/types.ts @@ -32,7 +32,7 @@ export interface Command { /** * An object to update the thread state with. */ - update?: Record; + update?: Record | Record[]; /** * The value to return from an `interrupt` function call. From c5023ba147d9d2ec91762b8db95f4716e68dc912 Mon Sep 17 00:00:00 2001 From: jacoblee93 Date: Mon, 30 Dec 2024 10:22:06 -0800 Subject: [PATCH 2/4] Modify type --- libs/sdk-js/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sdk-js/src/types.ts b/libs/sdk-js/src/types.ts index 5afd3123a..116a1d244 100644 --- a/libs/sdk-js/src/types.ts +++ b/libs/sdk-js/src/types.ts @@ -32,7 +32,7 @@ export interface Command { /** * An object to update the thread state with. */ - update?: Record | Record[]; + update?: Record | [string, unknown][]; /** * The value to return from an `interrupt` function call. From 6aef3e0117ede8449983ccf9de879ed66dde5bbf Mon Sep 17 00:00:00 2001 From: jacoblee93 Date: Mon, 30 Dec 2024 10:29:01 -0800 Subject: [PATCH 3/4] 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 From 2766fccb5b39e8a602ecec6f7127bbb25c92a530 Mon Sep 17 00:00:00 2001 From: jacoblee93 Date: Mon, 30 Dec 2024 10:30:50 -0800 Subject: [PATCH 4/4] Bump Python version --- libs/sdk-py/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sdk-py/pyproject.toml b/libs/sdk-py/pyproject.toml index 7ed7c49b1..5613ded15 100644 --- a/libs/sdk-py/pyproject.toml +++ b/libs/sdk-py/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-sdk" -version = "0.1.48" +version = "0.1.49" description = "SDK for interacting with LangGraph API" authors = [] license = "MIT"