@langchain/langgraph-sdk 0.0.6 → 0.0.8
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.
- package/dist/client.d.mts +1 -0
- package/dist/client.mjs +6 -0
- package/dist/types.d.mts +4 -0
- package/package.json +1 -1
package/dist/client.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import { AsyncCaller, AsyncCallerParams } from "./utils/async_caller.mjs";
|
|
|
3
3
|
import { RunsCreatePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent, CronsCreatePayload, OnConflictBehavior } from "./types.mjs";
|
|
4
4
|
interface ClientConfig {
|
|
5
5
|
apiUrl?: string;
|
|
6
|
+
apiKey?: string;
|
|
6
7
|
callerOptions?: AsyncCallerParams;
|
|
7
8
|
timeoutMs?: number;
|
|
8
9
|
defaultHeaders?: Record<string, string | null | undefined>;
|
package/dist/client.mjs
CHANGED
|
@@ -35,6 +35,9 @@ class BaseClient {
|
|
|
35
35
|
this.timeoutMs = config?.timeoutMs || 12_000;
|
|
36
36
|
this.apiUrl = config?.apiUrl || "http://localhost:8123";
|
|
37
37
|
this.defaultHeaders = config?.defaultHeaders || {};
|
|
38
|
+
if (config?.apiKey != null) {
|
|
39
|
+
this.defaultHeaders["X-Api-Key"] = config.apiKey;
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
42
|
prepareFetchOptions(path, options) {
|
|
40
43
|
const mutatedOptions = {
|
|
@@ -387,6 +390,7 @@ export class RunsClient extends BaseClient {
|
|
|
387
390
|
assistant_id: assistantId,
|
|
388
391
|
interrupt_before: payload?.interruptBefore,
|
|
389
392
|
interrupt_after: payload?.interruptAfter,
|
|
393
|
+
checkpoint_id: payload?.checkpointId,
|
|
390
394
|
};
|
|
391
395
|
if (payload?.multitaskStrategy != null) {
|
|
392
396
|
json["multitask_strategy"] = payload?.multitaskStrategy;
|
|
@@ -447,6 +451,7 @@ export class RunsClient extends BaseClient {
|
|
|
447
451
|
interrupt_before: payload?.interruptBefore,
|
|
448
452
|
interrupt_after: payload?.interruptAfter,
|
|
449
453
|
webhook: payload?.webhook,
|
|
454
|
+
checkpoint_id: payload?.checkpointId,
|
|
450
455
|
};
|
|
451
456
|
if (payload?.multitaskStrategy != null) {
|
|
452
457
|
json["multitask_strategy"] = payload?.multitaskStrategy;
|
|
@@ -473,6 +478,7 @@ export class RunsClient extends BaseClient {
|
|
|
473
478
|
assistant_id: assistantId,
|
|
474
479
|
interrupt_before: payload?.interruptBefore,
|
|
475
480
|
interrupt_after: payload?.interruptAfter,
|
|
481
|
+
checkpoint_id: payload?.checkpointId,
|
|
476
482
|
};
|
|
477
483
|
if (payload?.multitaskStrategy != null) {
|
|
478
484
|
json["multitask_strategy"] = payload?.multitaskStrategy;
|
package/dist/types.d.mts
CHANGED