mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-22 17:45:09 +02:00
feat(sdk): add bulk_update_state in SDK
This commit is contained in:
@@ -641,6 +641,10 @@ export class ThreadsClient<
|
||||
|
||||
/**
|
||||
* Create a new thread from a batch states.
|
||||
*
|
||||
* @param supersteps An array of supersteps.
|
||||
* @param options Additional options.
|
||||
* @returns The created thread.
|
||||
*/
|
||||
async bulkUpdateState(
|
||||
supersteps: Array<{
|
||||
@@ -653,7 +657,7 @@ export class ThreadsClient<
|
||||
ifExists?: OnConflictBehavior;
|
||||
},
|
||||
): Promise<Thread<TStateType>> {
|
||||
return this.fetch<Thread<TStateType>>("/threads/state/batch", {
|
||||
return this.fetch<Thread<TStateType>>("/threads/state/bulk", {
|
||||
method: "POST",
|
||||
json: {
|
||||
supersteps: supersteps.map((s) => ({
|
||||
|
||||
Reference in New Issue
Block a user