Merge pull request #1191 from langchain-ai/dqbd/js-sdk-types

feat(sdk-js): bump to 0.0.3, update types of updateState
This commit is contained in:
Nuno Campos
2024-08-02 13:05:20 -07:00
committed by GitHub
2 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -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",
+11 -8
View File
@@ -427,15 +427,18 @@ export class ThreadsClient extends BaseClient {
async updateState<ValuesType = DefaultValues>(
threadId: string,
options: { values: ValuesType; checkpointId?: string; asNode?: string },
): Promise<void> {
return this.fetch<void>(`/threads/${threadId}/state`, {
method: "POST",
json: {
values: options.values,
checkpoint_id: options.checkpointId,
as_node: options?.asNode,
): Promise<Pick<Config, "configurable">> {
return this.fetch<Pick<Config, "configurable">>(
`/threads/${threadId}/state`,
{
method: "POST",
json: {
values: options.values,
checkpoint_id: options.checkpointId,
as_node: options?.asNode,
},
},
});
);
}
/**