@langgraph-js/sdk 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -180,6 +180,7 @@ export declare class LangGraphClient extends Client {
|
|
|
180
180
|
private mergeSubGraphMessagesToStreamingMessages;
|
|
181
181
|
private runFETool;
|
|
182
182
|
private callFETool;
|
|
183
|
+
extraParams: Record<string, any>;
|
|
183
184
|
/**
|
|
184
185
|
* @zh 继续被前端工具中断的流程。
|
|
185
186
|
* @en Resumes a process interrupted by a frontend tool.
|
package/dist/LangGraphClient.js
CHANGED
|
@@ -39,6 +39,7 @@ export class LangGraphClient extends Client {
|
|
|
39
39
|
this.graphState = {};
|
|
40
40
|
/** 当前子图位置,但是依赖 stream,不太适合稳定使用*/
|
|
41
41
|
this.graphPosition = "";
|
|
42
|
+
this.extraParams = {};
|
|
42
43
|
}
|
|
43
44
|
listAssistants() {
|
|
44
45
|
return this.assistants.search({
|
|
@@ -372,7 +373,13 @@ export class LangGraphClient extends Client {
|
|
|
372
373
|
];
|
|
373
374
|
const streamResponse = (_debug === null || _debug === void 0 ? void 0 : _debug.streamResponse) ||
|
|
374
375
|
this.runs.stream(this.currentThread.thread_id, this.currentAssistant.assistant_id, {
|
|
375
|
-
input: {
|
|
376
|
+
input: {
|
|
377
|
+
...this.graphState,
|
|
378
|
+
...this.extraParams,
|
|
379
|
+
...(extraParams || {}),
|
|
380
|
+
messages: messagesToSend,
|
|
381
|
+
fe_tools: this.tools.toJSON(),
|
|
382
|
+
},
|
|
376
383
|
streamMode: ["messages", "values"],
|
|
377
384
|
streamSubgraphs: true,
|
|
378
385
|
command,
|
package/package.json
CHANGED
package/src/LangGraphClient.ts
CHANGED
|
@@ -451,7 +451,13 @@ export class LangGraphClient extends Client {
|
|
|
451
451
|
const streamResponse =
|
|
452
452
|
_debug?.streamResponse ||
|
|
453
453
|
this.runs.stream(this.currentThread!.thread_id, this.currentAssistant.assistant_id, {
|
|
454
|
-
input: {
|
|
454
|
+
input: {
|
|
455
|
+
...this.graphState,
|
|
456
|
+
...this.extraParams,
|
|
457
|
+
...(extraParams || {}),
|
|
458
|
+
messages: messagesToSend,
|
|
459
|
+
fe_tools: this.tools.toJSON(),
|
|
460
|
+
},
|
|
455
461
|
streamMode: ["messages", "values"],
|
|
456
462
|
streamSubgraphs: true,
|
|
457
463
|
command,
|
|
@@ -578,6 +584,8 @@ export class LangGraphClient extends Client {
|
|
|
578
584
|
const result = await this.tools.callTool(message.name!, args, { client: that, message });
|
|
579
585
|
return this.resume(result);
|
|
580
586
|
}
|
|
587
|
+
extraParams: Record<string, any> = {};
|
|
588
|
+
|
|
581
589
|
/**
|
|
582
590
|
* @zh 继续被前端工具中断的流程。
|
|
583
591
|
* @en Resumes a process interrupted by a frontend tool.
|