mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-10 03:37:51 +02:00
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:
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user