From 51dbb9493c697e2540a7e3c31b037062f326a7a4 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Thu, 1 Aug 2024 14:14:12 -0700 Subject: [PATCH 1/2] Improve types for updateState --- libs/sdk-js/src/client.mts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/libs/sdk-js/src/client.mts b/libs/sdk-js/src/client.mts index 642832eed..a39569a70 100644 --- a/libs/sdk-js/src/client.mts +++ b/libs/sdk-js/src/client.mts @@ -427,15 +427,18 @@ export class ThreadsClient extends BaseClient { async updateState( threadId: string, options: { values: ValuesType; checkpointId?: string; asNode?: string }, - ): Promise { - return this.fetch(`/threads/${threadId}/state`, { - method: "POST", - json: { - values: options.values, - checkpoint_id: options.checkpointId, - as_node: options?.asNode, + ): Promise> { + return this.fetch>( + `/threads/${threadId}/state`, + { + method: "POST", + json: { + values: options.values, + checkpoint_id: options.checkpointId, + as_node: options?.asNode, + }, }, - }); + ); } /** From a6e32e57e86f3625a035c2c4843a43ad0a375987 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Thu, 1 Aug 2024 14:14:40 -0700 Subject: [PATCH 2/2] Bump to 0.0.3 --- libs/sdk-js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sdk-js/package.json b/libs/sdk-js/package.json index f8c9c5a1a..2be6a6a77 100644 --- a/libs/sdk-js/package.json +++ b/libs/sdk-js/package.json @@ -1,6 +1,6 @@ { "name": "@langchain/langgraph-sdk", - "version": "0.0.2", + "version": "0.0.3", "description": "Client library for interacting with the LangGraph API", "type": "module", "packageManager": "yarn@1.22.19",