linkque-cli-v2 1.6.19 → 1.6.20
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/dev/worker.js +11 -37
- package/linkquejs.js +858 -756
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-ZVFW6DFO.js → chunk-22EQ6RXO.js} +1 -2845
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-SGKJHCSV.js → chunk-5MR5ICJ4.js} +1825 -2551
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-EAODRPW4.js +518 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-KRE5FADB.js → chunk-JMBJJF7P.js} +11 -37
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-RL3OKTKX.js → chunk-WHXLLQZR.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-YD5ZGNXC.js → google-generative-ai-KD7MXONK.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-M34UDW4J.js → google-vertex-TREYA472.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-KIOTOF73.js → mistral-conversations-5EI6JQBZ.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-LQR5KPZ3.js → otel-RUUFBBFE.js} +266 -578
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +1623 -2006
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +3 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +3 -2
- package/worker.js +3529 -4989
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-ZVFW6DFO.js → chunk-22EQ6RXO.js}
RENAMED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
RuntimeConfigProvider,
|
|
24
24
|
getRunEmbeddedQuery,
|
|
25
25
|
isDebugLoggingEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5MR5ICJ4.js";
|
|
27
27
|
import {
|
|
28
28
|
__commonJS,
|
|
29
29
|
__require,
|
|
@@ -11452,2829 +11452,6 @@ var Databases = class {
|
|
|
11452
11452
|
}
|
|
11453
11453
|
};
|
|
11454
11454
|
|
|
11455
|
-
// ../../node_modules/@alipay/appbase-node-sdk/dist/services/memory.mjs
|
|
11456
|
-
var Memory = class {
|
|
11457
|
-
constructor(client) {
|
|
11458
|
-
this.client = client;
|
|
11459
|
-
}
|
|
11460
|
-
listAudits(paramsOrFirst, ...rest) {
|
|
11461
|
-
let params;
|
|
11462
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11463
|
-
params = paramsOrFirst || {};
|
|
11464
|
-
} else {
|
|
11465
|
-
params = {
|
|
11466
|
-
jobId: paramsOrFirst,
|
|
11467
|
-
query: rest[0],
|
|
11468
|
-
operation: rest[1],
|
|
11469
|
-
outcome: rest[2],
|
|
11470
|
-
limit: rest[3],
|
|
11471
|
-
cursor: rest[4]
|
|
11472
|
-
};
|
|
11473
|
-
}
|
|
11474
|
-
const jobId = params.jobId;
|
|
11475
|
-
const query = params.query;
|
|
11476
|
-
const operation = params.operation;
|
|
11477
|
-
const outcome = params.outcome;
|
|
11478
|
-
const limit = params.limit;
|
|
11479
|
-
const cursor = params.cursor;
|
|
11480
|
-
const apiPath = "/memory/audits";
|
|
11481
|
-
const payload = {};
|
|
11482
|
-
if (typeof jobId !== "undefined") {
|
|
11483
|
-
payload["jobId"] = jobId;
|
|
11484
|
-
}
|
|
11485
|
-
if (typeof query !== "undefined") {
|
|
11486
|
-
payload["query"] = query;
|
|
11487
|
-
}
|
|
11488
|
-
if (typeof operation !== "undefined") {
|
|
11489
|
-
payload["operation"] = operation;
|
|
11490
|
-
}
|
|
11491
|
-
if (typeof outcome !== "undefined") {
|
|
11492
|
-
payload["outcome"] = outcome;
|
|
11493
|
-
}
|
|
11494
|
-
if (typeof limit !== "undefined") {
|
|
11495
|
-
payload["limit"] = limit;
|
|
11496
|
-
}
|
|
11497
|
-
if (typeof cursor !== "undefined") {
|
|
11498
|
-
payload["cursor"] = cursor;
|
|
11499
|
-
}
|
|
11500
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11501
|
-
const apiHeaders = {};
|
|
11502
|
-
return this.client.call(
|
|
11503
|
-
"get",
|
|
11504
|
-
uri,
|
|
11505
|
-
apiHeaders,
|
|
11506
|
-
payload
|
|
11507
|
-
);
|
|
11508
|
-
}
|
|
11509
|
-
getJob(paramsOrFirst) {
|
|
11510
|
-
let params;
|
|
11511
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11512
|
-
params = paramsOrFirst || {};
|
|
11513
|
-
} else {
|
|
11514
|
-
params = {
|
|
11515
|
-
jobId: paramsOrFirst
|
|
11516
|
-
};
|
|
11517
|
-
}
|
|
11518
|
-
const jobId = params.jobId;
|
|
11519
|
-
if (typeof jobId === "undefined") {
|
|
11520
|
-
throw new AppBaseException('Missing required parameter: "jobId"');
|
|
11521
|
-
}
|
|
11522
|
-
const apiPath = "/memory/jobs/{jobId}".replace("{jobId}", jobId);
|
|
11523
|
-
const payload = {};
|
|
11524
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11525
|
-
const apiHeaders = {};
|
|
11526
|
-
return this.client.call(
|
|
11527
|
-
"get",
|
|
11528
|
-
uri,
|
|
11529
|
-
apiHeaders,
|
|
11530
|
-
payload
|
|
11531
|
-
);
|
|
11532
|
-
}
|
|
11533
|
-
list(paramsOrFirst, ...rest) {
|
|
11534
|
-
let params;
|
|
11535
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11536
|
-
params = paramsOrFirst || {};
|
|
11537
|
-
} else {
|
|
11538
|
-
params = {
|
|
11539
|
-
cursor: paramsOrFirst,
|
|
11540
|
-
limit: rest[0],
|
|
11541
|
-
filter: rest[1],
|
|
11542
|
-
queries: rest[2],
|
|
11543
|
-
userId: rest[3],
|
|
11544
|
-
accessMode: rest[4]
|
|
11545
|
-
};
|
|
11546
|
-
}
|
|
11547
|
-
const cursor = params.cursor;
|
|
11548
|
-
const limit = params.limit;
|
|
11549
|
-
const filter = params.filter;
|
|
11550
|
-
const queries = params.queries;
|
|
11551
|
-
const userId = params.userId;
|
|
11552
|
-
const accessMode = params.accessMode;
|
|
11553
|
-
const apiPath = "/memory/memories";
|
|
11554
|
-
const payload = {};
|
|
11555
|
-
if (typeof cursor !== "undefined") {
|
|
11556
|
-
payload["cursor"] = cursor;
|
|
11557
|
-
}
|
|
11558
|
-
if (typeof limit !== "undefined") {
|
|
11559
|
-
payload["limit"] = limit;
|
|
11560
|
-
}
|
|
11561
|
-
if (typeof filter !== "undefined") {
|
|
11562
|
-
payload["filter"] = filter;
|
|
11563
|
-
}
|
|
11564
|
-
if (typeof queries !== "undefined") {
|
|
11565
|
-
payload["queries"] = queries;
|
|
11566
|
-
}
|
|
11567
|
-
if (typeof userId !== "undefined") {
|
|
11568
|
-
payload["userId"] = userId;
|
|
11569
|
-
}
|
|
11570
|
-
if (typeof accessMode !== "undefined") {
|
|
11571
|
-
payload["accessMode"] = accessMode;
|
|
11572
|
-
}
|
|
11573
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11574
|
-
const apiHeaders = {};
|
|
11575
|
-
return this.client.call(
|
|
11576
|
-
"get",
|
|
11577
|
-
uri,
|
|
11578
|
-
apiHeaders,
|
|
11579
|
-
payload
|
|
11580
|
-
);
|
|
11581
|
-
}
|
|
11582
|
-
create(paramsOrFirst, ...rest) {
|
|
11583
|
-
let params;
|
|
11584
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11585
|
-
params = paramsOrFirst || {};
|
|
11586
|
-
} else {
|
|
11587
|
-
params = {
|
|
11588
|
-
userId: paramsOrFirst,
|
|
11589
|
-
scope: rest[0],
|
|
11590
|
-
memoryType: rest[1],
|
|
11591
|
-
recordKind: rest[2],
|
|
11592
|
-
content: rest[3],
|
|
11593
|
-
messages: rest[4],
|
|
11594
|
-
agentId: rest[5],
|
|
11595
|
-
runId: rest[6],
|
|
11596
|
-
sensitivity: rest[7],
|
|
11597
|
-
handlingPolicy: rest[8],
|
|
11598
|
-
metadata: rest[9],
|
|
11599
|
-
infer: rest[10],
|
|
11600
|
-
reRemember: rest[11],
|
|
11601
|
-
async: rest[12]
|
|
11602
|
-
};
|
|
11603
|
-
}
|
|
11604
|
-
const userId = params.userId;
|
|
11605
|
-
const scope = params.scope;
|
|
11606
|
-
const memoryType = params.memoryType;
|
|
11607
|
-
const recordKind = params.recordKind;
|
|
11608
|
-
const content = params.content;
|
|
11609
|
-
const messages = params.messages;
|
|
11610
|
-
const agentId = params.agentId;
|
|
11611
|
-
const runId = params.runId;
|
|
11612
|
-
const sensitivity = params.sensitivity;
|
|
11613
|
-
const handlingPolicy = params.handlingPolicy;
|
|
11614
|
-
const metadata = params.metadata;
|
|
11615
|
-
const infer = params.infer;
|
|
11616
|
-
const reRemember = params.reRemember;
|
|
11617
|
-
const async = params.async;
|
|
11618
|
-
if (typeof userId === "undefined") {
|
|
11619
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
11620
|
-
}
|
|
11621
|
-
if (typeof scope === "undefined") {
|
|
11622
|
-
throw new AppBaseException('Missing required parameter: "scope"');
|
|
11623
|
-
}
|
|
11624
|
-
if (typeof memoryType === "undefined") {
|
|
11625
|
-
throw new AppBaseException('Missing required parameter: "memoryType"');
|
|
11626
|
-
}
|
|
11627
|
-
if (typeof recordKind === "undefined") {
|
|
11628
|
-
throw new AppBaseException('Missing required parameter: "recordKind"');
|
|
11629
|
-
}
|
|
11630
|
-
const apiPath = "/memory/memories";
|
|
11631
|
-
const payload = {};
|
|
11632
|
-
if (typeof content !== "undefined") {
|
|
11633
|
-
payload["content"] = content;
|
|
11634
|
-
}
|
|
11635
|
-
if (typeof messages !== "undefined") {
|
|
11636
|
-
payload["messages"] = messages;
|
|
11637
|
-
}
|
|
11638
|
-
if (typeof userId !== "undefined") {
|
|
11639
|
-
payload["userId"] = userId;
|
|
11640
|
-
}
|
|
11641
|
-
if (typeof agentId !== "undefined") {
|
|
11642
|
-
payload["agentId"] = agentId;
|
|
11643
|
-
}
|
|
11644
|
-
if (typeof runId !== "undefined") {
|
|
11645
|
-
payload["runId"] = runId;
|
|
11646
|
-
}
|
|
11647
|
-
if (typeof scope !== "undefined") {
|
|
11648
|
-
payload["scope"] = scope;
|
|
11649
|
-
}
|
|
11650
|
-
if (typeof sensitivity !== "undefined") {
|
|
11651
|
-
payload["sensitivity"] = sensitivity;
|
|
11652
|
-
}
|
|
11653
|
-
if (typeof handlingPolicy !== "undefined") {
|
|
11654
|
-
payload["handlingPolicy"] = handlingPolicy;
|
|
11655
|
-
}
|
|
11656
|
-
if (typeof memoryType !== "undefined") {
|
|
11657
|
-
payload["memoryType"] = memoryType;
|
|
11658
|
-
}
|
|
11659
|
-
if (typeof recordKind !== "undefined") {
|
|
11660
|
-
payload["recordKind"] = recordKind;
|
|
11661
|
-
}
|
|
11662
|
-
if (typeof metadata !== "undefined") {
|
|
11663
|
-
payload["metadata"] = metadata;
|
|
11664
|
-
}
|
|
11665
|
-
if (typeof infer !== "undefined") {
|
|
11666
|
-
payload["infer"] = infer;
|
|
11667
|
-
}
|
|
11668
|
-
if (typeof reRemember !== "undefined") {
|
|
11669
|
-
payload["reRemember"] = reRemember;
|
|
11670
|
-
}
|
|
11671
|
-
if (typeof async !== "undefined") {
|
|
11672
|
-
payload["async"] = async;
|
|
11673
|
-
}
|
|
11674
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11675
|
-
const apiHeaders = {
|
|
11676
|
-
"content-type": "application/json"
|
|
11677
|
-
};
|
|
11678
|
-
return this.client.call(
|
|
11679
|
-
"post",
|
|
11680
|
-
uri,
|
|
11681
|
-
apiHeaders,
|
|
11682
|
-
payload
|
|
11683
|
-
);
|
|
11684
|
-
}
|
|
11685
|
-
deleteMany(paramsOrFirst, ...rest) {
|
|
11686
|
-
let params;
|
|
11687
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11688
|
-
params = paramsOrFirst || {};
|
|
11689
|
-
} else {
|
|
11690
|
-
params = {
|
|
11691
|
-
userId: paramsOrFirst,
|
|
11692
|
-
limit: rest[0],
|
|
11693
|
-
reason: rest[1],
|
|
11694
|
-
source: rest[2]
|
|
11695
|
-
};
|
|
11696
|
-
}
|
|
11697
|
-
const userId = params.userId;
|
|
11698
|
-
const limit = params.limit;
|
|
11699
|
-
const reason = params.reason;
|
|
11700
|
-
const source = params.source;
|
|
11701
|
-
const apiPath = "/memory/memories";
|
|
11702
|
-
const payload = {};
|
|
11703
|
-
if (typeof userId !== "undefined") {
|
|
11704
|
-
payload["userId"] = userId;
|
|
11705
|
-
}
|
|
11706
|
-
if (typeof limit !== "undefined") {
|
|
11707
|
-
payload["limit"] = limit;
|
|
11708
|
-
}
|
|
11709
|
-
if (typeof reason !== "undefined") {
|
|
11710
|
-
payload["reason"] = reason;
|
|
11711
|
-
}
|
|
11712
|
-
if (typeof source !== "undefined") {
|
|
11713
|
-
payload["source"] = source;
|
|
11714
|
-
}
|
|
11715
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11716
|
-
const apiHeaders = {
|
|
11717
|
-
"content-type": "application/json"
|
|
11718
|
-
};
|
|
11719
|
-
return this.client.call(
|
|
11720
|
-
"delete",
|
|
11721
|
-
uri,
|
|
11722
|
-
apiHeaders,
|
|
11723
|
-
payload
|
|
11724
|
-
);
|
|
11725
|
-
}
|
|
11726
|
-
createBatch(paramsOrFirst) {
|
|
11727
|
-
let params;
|
|
11728
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "items" in paramsOrFirst) {
|
|
11729
|
-
params = paramsOrFirst || {};
|
|
11730
|
-
} else {
|
|
11731
|
-
params = {
|
|
11732
|
-
items: paramsOrFirst
|
|
11733
|
-
};
|
|
11734
|
-
}
|
|
11735
|
-
const items = params.items;
|
|
11736
|
-
if (typeof items === "undefined") {
|
|
11737
|
-
throw new AppBaseException('Missing required parameter: "items"');
|
|
11738
|
-
}
|
|
11739
|
-
const apiPath = "/memory/memories/batch";
|
|
11740
|
-
const payload = {};
|
|
11741
|
-
if (typeof items !== "undefined") {
|
|
11742
|
-
payload["items"] = items;
|
|
11743
|
-
}
|
|
11744
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11745
|
-
const apiHeaders = {
|
|
11746
|
-
"content-type": "application/json"
|
|
11747
|
-
};
|
|
11748
|
-
return this.client.call(
|
|
11749
|
-
"post",
|
|
11750
|
-
uri,
|
|
11751
|
-
apiHeaders,
|
|
11752
|
-
payload
|
|
11753
|
-
);
|
|
11754
|
-
}
|
|
11755
|
-
listContexts(paramsOrFirst, ...rest) {
|
|
11756
|
-
let params;
|
|
11757
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "status" in paramsOrFirst || "kind" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
11758
|
-
params = paramsOrFirst || {};
|
|
11759
|
-
} else {
|
|
11760
|
-
params = {
|
|
11761
|
-
scope: paramsOrFirst,
|
|
11762
|
-
userId: rest[0],
|
|
11763
|
-
agentId: rest[1],
|
|
11764
|
-
sessionId: rest[2],
|
|
11765
|
-
runId: rest[3],
|
|
11766
|
-
memorySubStoreId: rest[4],
|
|
11767
|
-
status: rest[5],
|
|
11768
|
-
kind: rest[6],
|
|
11769
|
-
cursor: rest[7],
|
|
11770
|
-
limit: rest[8]
|
|
11771
|
-
};
|
|
11772
|
-
}
|
|
11773
|
-
const scope = params.scope;
|
|
11774
|
-
const userId = params.userId;
|
|
11775
|
-
const agentId = params.agentId;
|
|
11776
|
-
const sessionId = params.sessionId;
|
|
11777
|
-
const runId = params.runId;
|
|
11778
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11779
|
-
const status = params.status;
|
|
11780
|
-
const kind = params.kind;
|
|
11781
|
-
const cursor = params.cursor;
|
|
11782
|
-
const limit = params.limit;
|
|
11783
|
-
const apiPath = "/memory/memories/contexts";
|
|
11784
|
-
const payload = {};
|
|
11785
|
-
if (typeof scope !== "undefined") {
|
|
11786
|
-
payload["scope"] = scope;
|
|
11787
|
-
}
|
|
11788
|
-
if (typeof userId !== "undefined") {
|
|
11789
|
-
payload["userId"] = userId;
|
|
11790
|
-
}
|
|
11791
|
-
if (typeof agentId !== "undefined") {
|
|
11792
|
-
payload["agentId"] = agentId;
|
|
11793
|
-
}
|
|
11794
|
-
if (typeof sessionId !== "undefined") {
|
|
11795
|
-
payload["sessionId"] = sessionId;
|
|
11796
|
-
}
|
|
11797
|
-
if (typeof runId !== "undefined") {
|
|
11798
|
-
payload["runId"] = runId;
|
|
11799
|
-
}
|
|
11800
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11801
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11802
|
-
}
|
|
11803
|
-
if (typeof status !== "undefined") {
|
|
11804
|
-
payload["status"] = status;
|
|
11805
|
-
}
|
|
11806
|
-
if (typeof kind !== "undefined") {
|
|
11807
|
-
payload["kind"] = kind;
|
|
11808
|
-
}
|
|
11809
|
-
if (typeof cursor !== "undefined") {
|
|
11810
|
-
payload["cursor"] = cursor;
|
|
11811
|
-
}
|
|
11812
|
-
if (typeof limit !== "undefined") {
|
|
11813
|
-
payload["limit"] = limit;
|
|
11814
|
-
}
|
|
11815
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11816
|
-
const apiHeaders = {};
|
|
11817
|
-
return this.client.call(
|
|
11818
|
-
"get",
|
|
11819
|
-
uri,
|
|
11820
|
-
apiHeaders,
|
|
11821
|
-
payload
|
|
11822
|
-
);
|
|
11823
|
-
}
|
|
11824
|
-
createContextRun(paramsOrFirst, ...rest) {
|
|
11825
|
-
let params;
|
|
11826
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst)) {
|
|
11827
|
-
params = paramsOrFirst || {};
|
|
11828
|
-
} else {
|
|
11829
|
-
params = {
|
|
11830
|
-
scope: paramsOrFirst,
|
|
11831
|
-
userId: rest[0],
|
|
11832
|
-
agentId: rest[1],
|
|
11833
|
-
sessionId: rest[2],
|
|
11834
|
-
runId: rest[3],
|
|
11835
|
-
memorySubStoreId: rest[4]
|
|
11836
|
-
};
|
|
11837
|
-
}
|
|
11838
|
-
const scope = params.scope;
|
|
11839
|
-
const userId = params.userId;
|
|
11840
|
-
const agentId = params.agentId;
|
|
11841
|
-
const sessionId = params.sessionId;
|
|
11842
|
-
const runId = params.runId;
|
|
11843
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11844
|
-
const apiPath = "/memory/memories/contexts/runs";
|
|
11845
|
-
const payload = {};
|
|
11846
|
-
if (typeof scope !== "undefined") {
|
|
11847
|
-
payload["scope"] = scope;
|
|
11848
|
-
}
|
|
11849
|
-
if (typeof userId !== "undefined") {
|
|
11850
|
-
payload["userId"] = userId;
|
|
11851
|
-
}
|
|
11852
|
-
if (typeof agentId !== "undefined") {
|
|
11853
|
-
payload["agentId"] = agentId;
|
|
11854
|
-
}
|
|
11855
|
-
if (typeof sessionId !== "undefined") {
|
|
11856
|
-
payload["sessionId"] = sessionId;
|
|
11857
|
-
}
|
|
11858
|
-
if (typeof runId !== "undefined") {
|
|
11859
|
-
payload["runId"] = runId;
|
|
11860
|
-
}
|
|
11861
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11862
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11863
|
-
}
|
|
11864
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11865
|
-
const apiHeaders = {
|
|
11866
|
-
"content-type": "application/json"
|
|
11867
|
-
};
|
|
11868
|
-
return this.client.call(
|
|
11869
|
-
"post",
|
|
11870
|
-
uri,
|
|
11871
|
-
apiHeaders,
|
|
11872
|
-
payload
|
|
11873
|
-
);
|
|
11874
|
-
}
|
|
11875
|
-
getContextStatus(paramsOrFirst, ...rest) {
|
|
11876
|
-
let params;
|
|
11877
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst)) {
|
|
11878
|
-
params = paramsOrFirst || {};
|
|
11879
|
-
} else {
|
|
11880
|
-
params = {
|
|
11881
|
-
scope: paramsOrFirst,
|
|
11882
|
-
userId: rest[0],
|
|
11883
|
-
agentId: rest[1],
|
|
11884
|
-
sessionId: rest[2],
|
|
11885
|
-
runId: rest[3],
|
|
11886
|
-
memorySubStoreId: rest[4]
|
|
11887
|
-
};
|
|
11888
|
-
}
|
|
11889
|
-
const scope = params.scope;
|
|
11890
|
-
const userId = params.userId;
|
|
11891
|
-
const agentId = params.agentId;
|
|
11892
|
-
const sessionId = params.sessionId;
|
|
11893
|
-
const runId = params.runId;
|
|
11894
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11895
|
-
const apiPath = "/memory/memories/contexts/status";
|
|
11896
|
-
const payload = {};
|
|
11897
|
-
if (typeof scope !== "undefined") {
|
|
11898
|
-
payload["scope"] = scope;
|
|
11899
|
-
}
|
|
11900
|
-
if (typeof userId !== "undefined") {
|
|
11901
|
-
payload["userId"] = userId;
|
|
11902
|
-
}
|
|
11903
|
-
if (typeof agentId !== "undefined") {
|
|
11904
|
-
payload["agentId"] = agentId;
|
|
11905
|
-
}
|
|
11906
|
-
if (typeof sessionId !== "undefined") {
|
|
11907
|
-
payload["sessionId"] = sessionId;
|
|
11908
|
-
}
|
|
11909
|
-
if (typeof runId !== "undefined") {
|
|
11910
|
-
payload["runId"] = runId;
|
|
11911
|
-
}
|
|
11912
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11913
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11914
|
-
}
|
|
11915
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11916
|
-
const apiHeaders = {};
|
|
11917
|
-
return this.client.call(
|
|
11918
|
-
"get",
|
|
11919
|
-
uri,
|
|
11920
|
-
apiHeaders,
|
|
11921
|
-
payload
|
|
11922
|
-
);
|
|
11923
|
-
}
|
|
11924
|
-
getContext(paramsOrFirst, ...rest) {
|
|
11925
|
-
let params;
|
|
11926
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11927
|
-
params = paramsOrFirst || {};
|
|
11928
|
-
} else {
|
|
11929
|
-
params = {
|
|
11930
|
-
contextId: paramsOrFirst,
|
|
11931
|
-
scope: rest[0],
|
|
11932
|
-
userId: rest[1],
|
|
11933
|
-
agentId: rest[2],
|
|
11934
|
-
sessionId: rest[3],
|
|
11935
|
-
runId: rest[4],
|
|
11936
|
-
memorySubStoreId: rest[5]
|
|
11937
|
-
};
|
|
11938
|
-
}
|
|
11939
|
-
const contextId = params.contextId;
|
|
11940
|
-
const scope = params.scope;
|
|
11941
|
-
const userId = params.userId;
|
|
11942
|
-
const agentId = params.agentId;
|
|
11943
|
-
const sessionId = params.sessionId;
|
|
11944
|
-
const runId = params.runId;
|
|
11945
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11946
|
-
if (typeof contextId === "undefined") {
|
|
11947
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
11948
|
-
}
|
|
11949
|
-
const apiPath = "/memory/memories/contexts/{contextId}".replace("{contextId}", contextId);
|
|
11950
|
-
const payload = {};
|
|
11951
|
-
if (typeof scope !== "undefined") {
|
|
11952
|
-
payload["scope"] = scope;
|
|
11953
|
-
}
|
|
11954
|
-
if (typeof userId !== "undefined") {
|
|
11955
|
-
payload["userId"] = userId;
|
|
11956
|
-
}
|
|
11957
|
-
if (typeof agentId !== "undefined") {
|
|
11958
|
-
payload["agentId"] = agentId;
|
|
11959
|
-
}
|
|
11960
|
-
if (typeof sessionId !== "undefined") {
|
|
11961
|
-
payload["sessionId"] = sessionId;
|
|
11962
|
-
}
|
|
11963
|
-
if (typeof runId !== "undefined") {
|
|
11964
|
-
payload["runId"] = runId;
|
|
11965
|
-
}
|
|
11966
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11967
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11968
|
-
}
|
|
11969
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11970
|
-
const apiHeaders = {};
|
|
11971
|
-
return this.client.call(
|
|
11972
|
-
"get",
|
|
11973
|
-
uri,
|
|
11974
|
-
apiHeaders,
|
|
11975
|
-
payload
|
|
11976
|
-
);
|
|
11977
|
-
}
|
|
11978
|
-
confirmContext(paramsOrFirst, ...rest) {
|
|
11979
|
-
let params;
|
|
11980
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11981
|
-
params = paramsOrFirst || {};
|
|
11982
|
-
} else {
|
|
11983
|
-
params = {
|
|
11984
|
-
contextId: paramsOrFirst,
|
|
11985
|
-
expectedVersion: rest[0],
|
|
11986
|
-
reason: rest[1],
|
|
11987
|
-
scope: rest[2],
|
|
11988
|
-
userId: rest[3],
|
|
11989
|
-
agentId: rest[4],
|
|
11990
|
-
sessionId: rest[5],
|
|
11991
|
-
runId: rest[6],
|
|
11992
|
-
memorySubStoreId: rest[7]
|
|
11993
|
-
};
|
|
11994
|
-
}
|
|
11995
|
-
const contextId = params.contextId;
|
|
11996
|
-
const expectedVersion = params.expectedVersion;
|
|
11997
|
-
const reason = params.reason;
|
|
11998
|
-
const scope = params.scope;
|
|
11999
|
-
const userId = params.userId;
|
|
12000
|
-
const agentId = params.agentId;
|
|
12001
|
-
const sessionId = params.sessionId;
|
|
12002
|
-
const runId = params.runId;
|
|
12003
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12004
|
-
if (typeof contextId === "undefined") {
|
|
12005
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
12006
|
-
}
|
|
12007
|
-
if (typeof expectedVersion === "undefined") {
|
|
12008
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
12009
|
-
}
|
|
12010
|
-
if (typeof reason === "undefined") {
|
|
12011
|
-
throw new AppBaseException('Missing required parameter: "reason"');
|
|
12012
|
-
}
|
|
12013
|
-
const apiPath = "/memory/memories/contexts/{contextId}/confirm".replace("{contextId}", contextId);
|
|
12014
|
-
const payload = {};
|
|
12015
|
-
if (typeof scope !== "undefined") {
|
|
12016
|
-
payload["scope"] = scope;
|
|
12017
|
-
}
|
|
12018
|
-
if (typeof userId !== "undefined") {
|
|
12019
|
-
payload["userId"] = userId;
|
|
12020
|
-
}
|
|
12021
|
-
if (typeof agentId !== "undefined") {
|
|
12022
|
-
payload["agentId"] = agentId;
|
|
12023
|
-
}
|
|
12024
|
-
if (typeof sessionId !== "undefined") {
|
|
12025
|
-
payload["sessionId"] = sessionId;
|
|
12026
|
-
}
|
|
12027
|
-
if (typeof runId !== "undefined") {
|
|
12028
|
-
payload["runId"] = runId;
|
|
12029
|
-
}
|
|
12030
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12031
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12032
|
-
}
|
|
12033
|
-
if (typeof expectedVersion !== "undefined") {
|
|
12034
|
-
payload["expectedVersion"] = expectedVersion;
|
|
12035
|
-
}
|
|
12036
|
-
if (typeof reason !== "undefined") {
|
|
12037
|
-
payload["reason"] = reason;
|
|
12038
|
-
}
|
|
12039
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12040
|
-
const apiHeaders = {
|
|
12041
|
-
"content-type": "application/json"
|
|
12042
|
-
};
|
|
12043
|
-
return this.client.call(
|
|
12044
|
-
"post",
|
|
12045
|
-
uri,
|
|
12046
|
-
apiHeaders,
|
|
12047
|
-
payload
|
|
12048
|
-
);
|
|
12049
|
-
}
|
|
12050
|
-
rebuildContext(paramsOrFirst, ...rest) {
|
|
12051
|
-
let params;
|
|
12052
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12053
|
-
params = paramsOrFirst || {};
|
|
12054
|
-
} else {
|
|
12055
|
-
params = {
|
|
12056
|
-
contextId: paramsOrFirst,
|
|
12057
|
-
reason: rest[0],
|
|
12058
|
-
scope: rest[1],
|
|
12059
|
-
userId: rest[2],
|
|
12060
|
-
agentId: rest[3],
|
|
12061
|
-
sessionId: rest[4],
|
|
12062
|
-
runId: rest[5],
|
|
12063
|
-
memorySubStoreId: rest[6]
|
|
12064
|
-
};
|
|
12065
|
-
}
|
|
12066
|
-
const contextId = params.contextId;
|
|
12067
|
-
const reason = params.reason;
|
|
12068
|
-
const scope = params.scope;
|
|
12069
|
-
const userId = params.userId;
|
|
12070
|
-
const agentId = params.agentId;
|
|
12071
|
-
const sessionId = params.sessionId;
|
|
12072
|
-
const runId = params.runId;
|
|
12073
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12074
|
-
if (typeof contextId === "undefined") {
|
|
12075
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
12076
|
-
}
|
|
12077
|
-
if (typeof reason === "undefined") {
|
|
12078
|
-
throw new AppBaseException('Missing required parameter: "reason"');
|
|
12079
|
-
}
|
|
12080
|
-
const apiPath = "/memory/memories/contexts/{contextId}/rebuild".replace("{contextId}", contextId);
|
|
12081
|
-
const payload = {};
|
|
12082
|
-
if (typeof scope !== "undefined") {
|
|
12083
|
-
payload["scope"] = scope;
|
|
12084
|
-
}
|
|
12085
|
-
if (typeof userId !== "undefined") {
|
|
12086
|
-
payload["userId"] = userId;
|
|
12087
|
-
}
|
|
12088
|
-
if (typeof agentId !== "undefined") {
|
|
12089
|
-
payload["agentId"] = agentId;
|
|
12090
|
-
}
|
|
12091
|
-
if (typeof sessionId !== "undefined") {
|
|
12092
|
-
payload["sessionId"] = sessionId;
|
|
12093
|
-
}
|
|
12094
|
-
if (typeof runId !== "undefined") {
|
|
12095
|
-
payload["runId"] = runId;
|
|
12096
|
-
}
|
|
12097
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12098
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12099
|
-
}
|
|
12100
|
-
if (typeof reason !== "undefined") {
|
|
12101
|
-
payload["reason"] = reason;
|
|
12102
|
-
}
|
|
12103
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12104
|
-
const apiHeaders = {
|
|
12105
|
-
"content-type": "application/json"
|
|
12106
|
-
};
|
|
12107
|
-
return this.client.call(
|
|
12108
|
-
"post",
|
|
12109
|
-
uri,
|
|
12110
|
-
apiHeaders,
|
|
12111
|
-
payload
|
|
12112
|
-
);
|
|
12113
|
-
}
|
|
12114
|
-
rollbackContext(paramsOrFirst, ...rest) {
|
|
12115
|
-
let params;
|
|
12116
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12117
|
-
params = paramsOrFirst || {};
|
|
12118
|
-
} else {
|
|
12119
|
-
params = {
|
|
12120
|
-
contextId: paramsOrFirst,
|
|
12121
|
-
expectedVersion: rest[0],
|
|
12122
|
-
targetRevision: rest[1],
|
|
12123
|
-
reason: rest[2],
|
|
12124
|
-
scope: rest[3],
|
|
12125
|
-
userId: rest[4],
|
|
12126
|
-
agentId: rest[5],
|
|
12127
|
-
sessionId: rest[6],
|
|
12128
|
-
runId: rest[7],
|
|
12129
|
-
memorySubStoreId: rest[8]
|
|
12130
|
-
};
|
|
12131
|
-
}
|
|
12132
|
-
const contextId = params.contextId;
|
|
12133
|
-
const expectedVersion = params.expectedVersion;
|
|
12134
|
-
const targetRevision = params.targetRevision;
|
|
12135
|
-
const reason = params.reason;
|
|
12136
|
-
const scope = params.scope;
|
|
12137
|
-
const userId = params.userId;
|
|
12138
|
-
const agentId = params.agentId;
|
|
12139
|
-
const sessionId = params.sessionId;
|
|
12140
|
-
const runId = params.runId;
|
|
12141
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12142
|
-
if (typeof contextId === "undefined") {
|
|
12143
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
12144
|
-
}
|
|
12145
|
-
if (typeof expectedVersion === "undefined") {
|
|
12146
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
12147
|
-
}
|
|
12148
|
-
if (typeof targetRevision === "undefined") {
|
|
12149
|
-
throw new AppBaseException('Missing required parameter: "targetRevision"');
|
|
12150
|
-
}
|
|
12151
|
-
if (typeof reason === "undefined") {
|
|
12152
|
-
throw new AppBaseException('Missing required parameter: "reason"');
|
|
12153
|
-
}
|
|
12154
|
-
const apiPath = "/memory/memories/contexts/{contextId}/rollback".replace("{contextId}", contextId);
|
|
12155
|
-
const payload = {};
|
|
12156
|
-
if (typeof scope !== "undefined") {
|
|
12157
|
-
payload["scope"] = scope;
|
|
12158
|
-
}
|
|
12159
|
-
if (typeof userId !== "undefined") {
|
|
12160
|
-
payload["userId"] = userId;
|
|
12161
|
-
}
|
|
12162
|
-
if (typeof agentId !== "undefined") {
|
|
12163
|
-
payload["agentId"] = agentId;
|
|
12164
|
-
}
|
|
12165
|
-
if (typeof sessionId !== "undefined") {
|
|
12166
|
-
payload["sessionId"] = sessionId;
|
|
12167
|
-
}
|
|
12168
|
-
if (typeof runId !== "undefined") {
|
|
12169
|
-
payload["runId"] = runId;
|
|
12170
|
-
}
|
|
12171
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12172
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12173
|
-
}
|
|
12174
|
-
if (typeof expectedVersion !== "undefined") {
|
|
12175
|
-
payload["expectedVersion"] = expectedVersion;
|
|
12176
|
-
}
|
|
12177
|
-
if (typeof targetRevision !== "undefined") {
|
|
12178
|
-
payload["targetRevision"] = targetRevision;
|
|
12179
|
-
}
|
|
12180
|
-
if (typeof reason !== "undefined") {
|
|
12181
|
-
payload["reason"] = reason;
|
|
12182
|
-
}
|
|
12183
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12184
|
-
const apiHeaders = {
|
|
12185
|
-
"content-type": "application/json"
|
|
12186
|
-
};
|
|
12187
|
-
return this.client.call(
|
|
12188
|
-
"post",
|
|
12189
|
-
uri,
|
|
12190
|
-
apiHeaders,
|
|
12191
|
-
payload
|
|
12192
|
-
);
|
|
12193
|
-
}
|
|
12194
|
-
listDistillations(paramsOrFirst, ...rest) {
|
|
12195
|
-
let params;
|
|
12196
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "status" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
12197
|
-
params = paramsOrFirst || {};
|
|
12198
|
-
} else {
|
|
12199
|
-
params = {
|
|
12200
|
-
scope: paramsOrFirst,
|
|
12201
|
-
userId: rest[0],
|
|
12202
|
-
agentId: rest[1],
|
|
12203
|
-
sessionId: rest[2],
|
|
12204
|
-
runId: rest[3],
|
|
12205
|
-
memorySubStoreId: rest[4],
|
|
12206
|
-
status: rest[5],
|
|
12207
|
-
cursor: rest[6],
|
|
12208
|
-
limit: rest[7]
|
|
12209
|
-
};
|
|
12210
|
-
}
|
|
12211
|
-
const scope = params.scope;
|
|
12212
|
-
const userId = params.userId;
|
|
12213
|
-
const agentId = params.agentId;
|
|
12214
|
-
const sessionId = params.sessionId;
|
|
12215
|
-
const runId = params.runId;
|
|
12216
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12217
|
-
const status = params.status;
|
|
12218
|
-
const cursor = params.cursor;
|
|
12219
|
-
const limit = params.limit;
|
|
12220
|
-
const apiPath = "/memory/memories/distillations";
|
|
12221
|
-
const payload = {};
|
|
12222
|
-
if (typeof scope !== "undefined") {
|
|
12223
|
-
payload["scope"] = scope;
|
|
12224
|
-
}
|
|
12225
|
-
if (typeof userId !== "undefined") {
|
|
12226
|
-
payload["userId"] = userId;
|
|
12227
|
-
}
|
|
12228
|
-
if (typeof agentId !== "undefined") {
|
|
12229
|
-
payload["agentId"] = agentId;
|
|
12230
|
-
}
|
|
12231
|
-
if (typeof sessionId !== "undefined") {
|
|
12232
|
-
payload["sessionId"] = sessionId;
|
|
12233
|
-
}
|
|
12234
|
-
if (typeof runId !== "undefined") {
|
|
12235
|
-
payload["runId"] = runId;
|
|
12236
|
-
}
|
|
12237
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12238
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12239
|
-
}
|
|
12240
|
-
if (typeof status !== "undefined") {
|
|
12241
|
-
payload["status"] = status;
|
|
12242
|
-
}
|
|
12243
|
-
if (typeof cursor !== "undefined") {
|
|
12244
|
-
payload["cursor"] = cursor;
|
|
12245
|
-
}
|
|
12246
|
-
if (typeof limit !== "undefined") {
|
|
12247
|
-
payload["limit"] = limit;
|
|
12248
|
-
}
|
|
12249
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12250
|
-
const apiHeaders = {};
|
|
12251
|
-
return this.client.call(
|
|
12252
|
-
"get",
|
|
12253
|
-
uri,
|
|
12254
|
-
apiHeaders,
|
|
12255
|
-
payload
|
|
12256
|
-
);
|
|
12257
|
-
}
|
|
12258
|
-
submitDistillation(paramsOrFirst, ...rest) {
|
|
12259
|
-
let params;
|
|
12260
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "sourceId" in paramsOrFirst || "sourceType" in paramsOrFirst || "messages" in paramsOrFirst || "toolEvents" in paramsOrFirst || "mode" in paramsOrFirst || "idempotencyKey" in paramsOrFirst)) {
|
|
12261
|
-
params = paramsOrFirst || {};
|
|
12262
|
-
} else {
|
|
12263
|
-
params = {
|
|
12264
|
-
scope: paramsOrFirst,
|
|
12265
|
-
userId: rest[0],
|
|
12266
|
-
agentId: rest[1],
|
|
12267
|
-
sessionId: rest[2],
|
|
12268
|
-
runId: rest[3],
|
|
12269
|
-
memorySubStoreId: rest[4],
|
|
12270
|
-
sourceId: rest[5],
|
|
12271
|
-
sourceType: rest[6],
|
|
12272
|
-
messages: rest[7],
|
|
12273
|
-
toolEvents: rest[8],
|
|
12274
|
-
mode: rest[9],
|
|
12275
|
-
idempotencyKey: rest[10]
|
|
12276
|
-
};
|
|
12277
|
-
}
|
|
12278
|
-
const scope = params.scope;
|
|
12279
|
-
const userId = params.userId;
|
|
12280
|
-
const agentId = params.agentId;
|
|
12281
|
-
const sessionId = params.sessionId;
|
|
12282
|
-
const runId = params.runId;
|
|
12283
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12284
|
-
const sourceId = params.sourceId;
|
|
12285
|
-
const sourceType = params.sourceType;
|
|
12286
|
-
const messages = params.messages;
|
|
12287
|
-
const toolEvents = params.toolEvents;
|
|
12288
|
-
const mode = params.mode;
|
|
12289
|
-
const idempotencyKey = params.idempotencyKey;
|
|
12290
|
-
const apiPath = "/memory/memories/distillations";
|
|
12291
|
-
const payload = {};
|
|
12292
|
-
if (typeof scope !== "undefined") {
|
|
12293
|
-
payload["scope"] = scope;
|
|
12294
|
-
}
|
|
12295
|
-
if (typeof userId !== "undefined") {
|
|
12296
|
-
payload["userId"] = userId;
|
|
12297
|
-
}
|
|
12298
|
-
if (typeof agentId !== "undefined") {
|
|
12299
|
-
payload["agentId"] = agentId;
|
|
12300
|
-
}
|
|
12301
|
-
if (typeof sessionId !== "undefined") {
|
|
12302
|
-
payload["sessionId"] = sessionId;
|
|
12303
|
-
}
|
|
12304
|
-
if (typeof runId !== "undefined") {
|
|
12305
|
-
payload["runId"] = runId;
|
|
12306
|
-
}
|
|
12307
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12308
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12309
|
-
}
|
|
12310
|
-
if (typeof sourceId !== "undefined") {
|
|
12311
|
-
payload["sourceId"] = sourceId;
|
|
12312
|
-
}
|
|
12313
|
-
if (typeof sourceType !== "undefined") {
|
|
12314
|
-
payload["sourceType"] = sourceType;
|
|
12315
|
-
}
|
|
12316
|
-
if (typeof messages !== "undefined") {
|
|
12317
|
-
payload["messages"] = messages;
|
|
12318
|
-
}
|
|
12319
|
-
if (typeof toolEvents !== "undefined") {
|
|
12320
|
-
payload["toolEvents"] = toolEvents;
|
|
12321
|
-
}
|
|
12322
|
-
if (typeof mode !== "undefined") {
|
|
12323
|
-
payload["mode"] = mode;
|
|
12324
|
-
}
|
|
12325
|
-
if (typeof idempotencyKey !== "undefined") {
|
|
12326
|
-
payload["idempotencyKey"] = idempotencyKey;
|
|
12327
|
-
}
|
|
12328
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12329
|
-
const apiHeaders = {
|
|
12330
|
-
"content-type": "application/json"
|
|
12331
|
-
};
|
|
12332
|
-
return this.client.call(
|
|
12333
|
-
"post",
|
|
12334
|
-
uri,
|
|
12335
|
-
apiHeaders,
|
|
12336
|
-
payload
|
|
12337
|
-
);
|
|
12338
|
-
}
|
|
12339
|
-
getDistillation(paramsOrFirst, ...rest) {
|
|
12340
|
-
let params;
|
|
12341
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12342
|
-
params = paramsOrFirst || {};
|
|
12343
|
-
} else {
|
|
12344
|
-
params = {
|
|
12345
|
-
distillationId: paramsOrFirst,
|
|
12346
|
-
scope: rest[0],
|
|
12347
|
-
userId: rest[1],
|
|
12348
|
-
agentId: rest[2],
|
|
12349
|
-
sessionId: rest[3],
|
|
12350
|
-
runId: rest[4],
|
|
12351
|
-
memorySubStoreId: rest[5]
|
|
12352
|
-
};
|
|
12353
|
-
}
|
|
12354
|
-
const distillationId = params.distillationId;
|
|
12355
|
-
const scope = params.scope;
|
|
12356
|
-
const userId = params.userId;
|
|
12357
|
-
const agentId = params.agentId;
|
|
12358
|
-
const sessionId = params.sessionId;
|
|
12359
|
-
const runId = params.runId;
|
|
12360
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12361
|
-
if (typeof distillationId === "undefined") {
|
|
12362
|
-
throw new AppBaseException('Missing required parameter: "distillationId"');
|
|
12363
|
-
}
|
|
12364
|
-
const apiPath = "/memory/memories/distillations/{distillationId}".replace("{distillationId}", distillationId);
|
|
12365
|
-
const payload = {};
|
|
12366
|
-
if (typeof scope !== "undefined") {
|
|
12367
|
-
payload["scope"] = scope;
|
|
12368
|
-
}
|
|
12369
|
-
if (typeof userId !== "undefined") {
|
|
12370
|
-
payload["userId"] = userId;
|
|
12371
|
-
}
|
|
12372
|
-
if (typeof agentId !== "undefined") {
|
|
12373
|
-
payload["agentId"] = agentId;
|
|
12374
|
-
}
|
|
12375
|
-
if (typeof sessionId !== "undefined") {
|
|
12376
|
-
payload["sessionId"] = sessionId;
|
|
12377
|
-
}
|
|
12378
|
-
if (typeof runId !== "undefined") {
|
|
12379
|
-
payload["runId"] = runId;
|
|
12380
|
-
}
|
|
12381
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12382
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12383
|
-
}
|
|
12384
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12385
|
-
const apiHeaders = {};
|
|
12386
|
-
return this.client.call(
|
|
12387
|
-
"get",
|
|
12388
|
-
uri,
|
|
12389
|
-
apiHeaders,
|
|
12390
|
-
payload
|
|
12391
|
-
);
|
|
12392
|
-
}
|
|
12393
|
-
replayDistillation(paramsOrFirst, ...rest) {
|
|
12394
|
-
let params;
|
|
12395
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12396
|
-
params = paramsOrFirst || {};
|
|
12397
|
-
} else {
|
|
12398
|
-
params = {
|
|
12399
|
-
distillationId: paramsOrFirst,
|
|
12400
|
-
scope: rest[0],
|
|
12401
|
-
userId: rest[1],
|
|
12402
|
-
agentId: rest[2],
|
|
12403
|
-
sessionId: rest[3],
|
|
12404
|
-
runId: rest[4],
|
|
12405
|
-
memorySubStoreId: rest[5]
|
|
12406
|
-
};
|
|
12407
|
-
}
|
|
12408
|
-
const distillationId = params.distillationId;
|
|
12409
|
-
const scope = params.scope;
|
|
12410
|
-
const userId = params.userId;
|
|
12411
|
-
const agentId = params.agentId;
|
|
12412
|
-
const sessionId = params.sessionId;
|
|
12413
|
-
const runId = params.runId;
|
|
12414
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12415
|
-
if (typeof distillationId === "undefined") {
|
|
12416
|
-
throw new AppBaseException('Missing required parameter: "distillationId"');
|
|
12417
|
-
}
|
|
12418
|
-
const apiPath = "/memory/memories/distillations/{distillationId}/replay".replace("{distillationId}", distillationId);
|
|
12419
|
-
const payload = {};
|
|
12420
|
-
if (typeof scope !== "undefined") {
|
|
12421
|
-
payload["scope"] = scope;
|
|
12422
|
-
}
|
|
12423
|
-
if (typeof userId !== "undefined") {
|
|
12424
|
-
payload["userId"] = userId;
|
|
12425
|
-
}
|
|
12426
|
-
if (typeof agentId !== "undefined") {
|
|
12427
|
-
payload["agentId"] = agentId;
|
|
12428
|
-
}
|
|
12429
|
-
if (typeof sessionId !== "undefined") {
|
|
12430
|
-
payload["sessionId"] = sessionId;
|
|
12431
|
-
}
|
|
12432
|
-
if (typeof runId !== "undefined") {
|
|
12433
|
-
payload["runId"] = runId;
|
|
12434
|
-
}
|
|
12435
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12436
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12437
|
-
}
|
|
12438
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12439
|
-
const apiHeaders = {
|
|
12440
|
-
"content-type": "application/json"
|
|
12441
|
-
};
|
|
12442
|
-
return this.client.call(
|
|
12443
|
-
"post",
|
|
12444
|
-
uri,
|
|
12445
|
-
apiHeaders,
|
|
12446
|
-
payload
|
|
12447
|
-
);
|
|
12448
|
-
}
|
|
12449
|
-
listExperiences(paramsOrFirst, ...rest) {
|
|
12450
|
-
let params;
|
|
12451
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
12452
|
-
params = paramsOrFirst || {};
|
|
12453
|
-
} else {
|
|
12454
|
-
params = {
|
|
12455
|
-
scope: paramsOrFirst,
|
|
12456
|
-
userId: rest[0],
|
|
12457
|
-
agentId: rest[1],
|
|
12458
|
-
sessionId: rest[2],
|
|
12459
|
-
runId: rest[3],
|
|
12460
|
-
memorySubStoreId: rest[4],
|
|
12461
|
-
cursor: rest[5],
|
|
12462
|
-
limit: rest[6]
|
|
12463
|
-
};
|
|
12464
|
-
}
|
|
12465
|
-
const scope = params.scope;
|
|
12466
|
-
const userId = params.userId;
|
|
12467
|
-
const agentId = params.agentId;
|
|
12468
|
-
const sessionId = params.sessionId;
|
|
12469
|
-
const runId = params.runId;
|
|
12470
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12471
|
-
const cursor = params.cursor;
|
|
12472
|
-
const limit = params.limit;
|
|
12473
|
-
const apiPath = "/memory/memories/experiences";
|
|
12474
|
-
const payload = {};
|
|
12475
|
-
if (typeof scope !== "undefined") {
|
|
12476
|
-
payload["scope"] = scope;
|
|
12477
|
-
}
|
|
12478
|
-
if (typeof userId !== "undefined") {
|
|
12479
|
-
payload["userId"] = userId;
|
|
12480
|
-
}
|
|
12481
|
-
if (typeof agentId !== "undefined") {
|
|
12482
|
-
payload["agentId"] = agentId;
|
|
12483
|
-
}
|
|
12484
|
-
if (typeof sessionId !== "undefined") {
|
|
12485
|
-
payload["sessionId"] = sessionId;
|
|
12486
|
-
}
|
|
12487
|
-
if (typeof runId !== "undefined") {
|
|
12488
|
-
payload["runId"] = runId;
|
|
12489
|
-
}
|
|
12490
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12491
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12492
|
-
}
|
|
12493
|
-
if (typeof cursor !== "undefined") {
|
|
12494
|
-
payload["cursor"] = cursor;
|
|
12495
|
-
}
|
|
12496
|
-
if (typeof limit !== "undefined") {
|
|
12497
|
-
payload["limit"] = limit;
|
|
12498
|
-
}
|
|
12499
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12500
|
-
const apiHeaders = {};
|
|
12501
|
-
return this.client.call(
|
|
12502
|
-
"get",
|
|
12503
|
-
uri,
|
|
12504
|
-
apiHeaders,
|
|
12505
|
-
payload
|
|
12506
|
-
);
|
|
12507
|
-
}
|
|
12508
|
-
searchExperiences(paramsOrFirst, ...rest) {
|
|
12509
|
-
let params;
|
|
12510
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12511
|
-
params = paramsOrFirst || {};
|
|
12512
|
-
} else {
|
|
12513
|
-
params = {
|
|
12514
|
-
query: paramsOrFirst,
|
|
12515
|
-
scope: rest[0],
|
|
12516
|
-
userId: rest[1],
|
|
12517
|
-
agentId: rest[2],
|
|
12518
|
-
sessionId: rest[3],
|
|
12519
|
-
runId: rest[4],
|
|
12520
|
-
memorySubStoreId: rest[5],
|
|
12521
|
-
cursor: rest[6],
|
|
12522
|
-
limit: rest[7],
|
|
12523
|
-
retrieval: rest[8]
|
|
12524
|
-
};
|
|
12525
|
-
}
|
|
12526
|
-
const query = params.query;
|
|
12527
|
-
const scope = params.scope;
|
|
12528
|
-
const userId = params.userId;
|
|
12529
|
-
const agentId = params.agentId;
|
|
12530
|
-
const sessionId = params.sessionId;
|
|
12531
|
-
const runId = params.runId;
|
|
12532
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12533
|
-
const cursor = params.cursor;
|
|
12534
|
-
const limit = params.limit;
|
|
12535
|
-
const retrieval = params.retrieval;
|
|
12536
|
-
if (typeof query === "undefined") {
|
|
12537
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
12538
|
-
}
|
|
12539
|
-
const apiPath = "/memory/memories/experiences/search";
|
|
12540
|
-
const payload = {};
|
|
12541
|
-
if (typeof scope !== "undefined") {
|
|
12542
|
-
payload["scope"] = scope;
|
|
12543
|
-
}
|
|
12544
|
-
if (typeof userId !== "undefined") {
|
|
12545
|
-
payload["userId"] = userId;
|
|
12546
|
-
}
|
|
12547
|
-
if (typeof agentId !== "undefined") {
|
|
12548
|
-
payload["agentId"] = agentId;
|
|
12549
|
-
}
|
|
12550
|
-
if (typeof sessionId !== "undefined") {
|
|
12551
|
-
payload["sessionId"] = sessionId;
|
|
12552
|
-
}
|
|
12553
|
-
if (typeof runId !== "undefined") {
|
|
12554
|
-
payload["runId"] = runId;
|
|
12555
|
-
}
|
|
12556
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12557
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12558
|
-
}
|
|
12559
|
-
if (typeof query !== "undefined") {
|
|
12560
|
-
payload["query"] = query;
|
|
12561
|
-
}
|
|
12562
|
-
if (typeof cursor !== "undefined") {
|
|
12563
|
-
payload["cursor"] = cursor;
|
|
12564
|
-
}
|
|
12565
|
-
if (typeof limit !== "undefined") {
|
|
12566
|
-
payload["limit"] = limit;
|
|
12567
|
-
}
|
|
12568
|
-
if (typeof retrieval !== "undefined") {
|
|
12569
|
-
payload["retrieval"] = retrieval;
|
|
12570
|
-
}
|
|
12571
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12572
|
-
const apiHeaders = {
|
|
12573
|
-
"content-type": "application/json"
|
|
12574
|
-
};
|
|
12575
|
-
return this.client.call(
|
|
12576
|
-
"post",
|
|
12577
|
-
uri,
|
|
12578
|
-
apiHeaders,
|
|
12579
|
-
payload
|
|
12580
|
-
);
|
|
12581
|
-
}
|
|
12582
|
-
getExperience(paramsOrFirst, ...rest) {
|
|
12583
|
-
let params;
|
|
12584
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12585
|
-
params = paramsOrFirst || {};
|
|
12586
|
-
} else {
|
|
12587
|
-
params = {
|
|
12588
|
-
knowledgeId: paramsOrFirst,
|
|
12589
|
-
scope: rest[0],
|
|
12590
|
-
userId: rest[1],
|
|
12591
|
-
agentId: rest[2],
|
|
12592
|
-
sessionId: rest[3],
|
|
12593
|
-
runId: rest[4],
|
|
12594
|
-
memorySubStoreId: rest[5]
|
|
12595
|
-
};
|
|
12596
|
-
}
|
|
12597
|
-
const knowledgeId = params.knowledgeId;
|
|
12598
|
-
const scope = params.scope;
|
|
12599
|
-
const userId = params.userId;
|
|
12600
|
-
const agentId = params.agentId;
|
|
12601
|
-
const sessionId = params.sessionId;
|
|
12602
|
-
const runId = params.runId;
|
|
12603
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12604
|
-
if (typeof knowledgeId === "undefined") {
|
|
12605
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
12606
|
-
}
|
|
12607
|
-
const apiPath = "/memory/memories/experiences/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
12608
|
-
const payload = {};
|
|
12609
|
-
if (typeof scope !== "undefined") {
|
|
12610
|
-
payload["scope"] = scope;
|
|
12611
|
-
}
|
|
12612
|
-
if (typeof userId !== "undefined") {
|
|
12613
|
-
payload["userId"] = userId;
|
|
12614
|
-
}
|
|
12615
|
-
if (typeof agentId !== "undefined") {
|
|
12616
|
-
payload["agentId"] = agentId;
|
|
12617
|
-
}
|
|
12618
|
-
if (typeof sessionId !== "undefined") {
|
|
12619
|
-
payload["sessionId"] = sessionId;
|
|
12620
|
-
}
|
|
12621
|
-
if (typeof runId !== "undefined") {
|
|
12622
|
-
payload["runId"] = runId;
|
|
12623
|
-
}
|
|
12624
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12625
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12626
|
-
}
|
|
12627
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12628
|
-
const apiHeaders = {};
|
|
12629
|
-
return this.client.call(
|
|
12630
|
-
"get",
|
|
12631
|
-
uri,
|
|
12632
|
-
apiHeaders,
|
|
12633
|
-
payload
|
|
12634
|
-
);
|
|
12635
|
-
}
|
|
12636
|
-
listExperienceSources(paramsOrFirst, ...rest) {
|
|
12637
|
-
let params;
|
|
12638
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12639
|
-
params = paramsOrFirst || {};
|
|
12640
|
-
} else {
|
|
12641
|
-
params = {
|
|
12642
|
-
knowledgeId: paramsOrFirst,
|
|
12643
|
-
scope: rest[0],
|
|
12644
|
-
userId: rest[1],
|
|
12645
|
-
agentId: rest[2],
|
|
12646
|
-
sessionId: rest[3],
|
|
12647
|
-
runId: rest[4],
|
|
12648
|
-
memorySubStoreId: rest[5],
|
|
12649
|
-
cursor: rest[6],
|
|
12650
|
-
limit: rest[7]
|
|
12651
|
-
};
|
|
12652
|
-
}
|
|
12653
|
-
const knowledgeId = params.knowledgeId;
|
|
12654
|
-
const scope = params.scope;
|
|
12655
|
-
const userId = params.userId;
|
|
12656
|
-
const agentId = params.agentId;
|
|
12657
|
-
const sessionId = params.sessionId;
|
|
12658
|
-
const runId = params.runId;
|
|
12659
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12660
|
-
const cursor = params.cursor;
|
|
12661
|
-
const limit = params.limit;
|
|
12662
|
-
if (typeof knowledgeId === "undefined") {
|
|
12663
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
12664
|
-
}
|
|
12665
|
-
const apiPath = "/memory/memories/experiences/{knowledgeId}/sources".replace("{knowledgeId}", knowledgeId);
|
|
12666
|
-
const payload = {};
|
|
12667
|
-
if (typeof scope !== "undefined") {
|
|
12668
|
-
payload["scope"] = scope;
|
|
12669
|
-
}
|
|
12670
|
-
if (typeof userId !== "undefined") {
|
|
12671
|
-
payload["userId"] = userId;
|
|
12672
|
-
}
|
|
12673
|
-
if (typeof agentId !== "undefined") {
|
|
12674
|
-
payload["agentId"] = agentId;
|
|
12675
|
-
}
|
|
12676
|
-
if (typeof sessionId !== "undefined") {
|
|
12677
|
-
payload["sessionId"] = sessionId;
|
|
12678
|
-
}
|
|
12679
|
-
if (typeof runId !== "undefined") {
|
|
12680
|
-
payload["runId"] = runId;
|
|
12681
|
-
}
|
|
12682
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12683
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12684
|
-
}
|
|
12685
|
-
if (typeof cursor !== "undefined") {
|
|
12686
|
-
payload["cursor"] = cursor;
|
|
12687
|
-
}
|
|
12688
|
-
if (typeof limit !== "undefined") {
|
|
12689
|
-
payload["limit"] = limit;
|
|
12690
|
-
}
|
|
12691
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12692
|
-
const apiHeaders = {};
|
|
12693
|
-
return this.client.call(
|
|
12694
|
-
"get",
|
|
12695
|
-
uri,
|
|
12696
|
-
apiHeaders,
|
|
12697
|
-
payload
|
|
12698
|
-
);
|
|
12699
|
-
}
|
|
12700
|
-
getExport(paramsOrFirst, ...rest) {
|
|
12701
|
-
let params;
|
|
12702
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12703
|
-
params = paramsOrFirst || {};
|
|
12704
|
-
} else {
|
|
12705
|
-
params = {
|
|
12706
|
-
userId: paramsOrFirst,
|
|
12707
|
-
format: rest[0],
|
|
12708
|
-
mode: rest[1],
|
|
12709
|
-
includeForgotten: rest[2],
|
|
12710
|
-
includeVectors: rest[3],
|
|
12711
|
-
includeRawSources: rest[4]
|
|
12712
|
-
};
|
|
12713
|
-
}
|
|
12714
|
-
const userId = params.userId;
|
|
12715
|
-
const format = params.format;
|
|
12716
|
-
const mode = params.mode;
|
|
12717
|
-
const includeForgotten = params.includeForgotten;
|
|
12718
|
-
const includeVectors = params.includeVectors;
|
|
12719
|
-
const includeRawSources = params.includeRawSources;
|
|
12720
|
-
if (typeof userId === "undefined") {
|
|
12721
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
12722
|
-
}
|
|
12723
|
-
const apiPath = "/memory/memories/export";
|
|
12724
|
-
const payload = {};
|
|
12725
|
-
if (typeof userId !== "undefined") {
|
|
12726
|
-
payload["userId"] = userId;
|
|
12727
|
-
}
|
|
12728
|
-
if (typeof format !== "undefined") {
|
|
12729
|
-
payload["format"] = format;
|
|
12730
|
-
}
|
|
12731
|
-
if (typeof mode !== "undefined") {
|
|
12732
|
-
payload["mode"] = mode;
|
|
12733
|
-
}
|
|
12734
|
-
if (typeof includeForgotten !== "undefined") {
|
|
12735
|
-
payload["includeForgotten"] = includeForgotten;
|
|
12736
|
-
}
|
|
12737
|
-
if (typeof includeVectors !== "undefined") {
|
|
12738
|
-
payload["includeVectors"] = includeVectors;
|
|
12739
|
-
}
|
|
12740
|
-
if (typeof includeRawSources !== "undefined") {
|
|
12741
|
-
payload["includeRawSources"] = includeRawSources;
|
|
12742
|
-
}
|
|
12743
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12744
|
-
const apiHeaders = {};
|
|
12745
|
-
return this.client.call(
|
|
12746
|
-
"get",
|
|
12747
|
-
uri,
|
|
12748
|
-
apiHeaders,
|
|
12749
|
-
payload
|
|
12750
|
-
);
|
|
12751
|
-
}
|
|
12752
|
-
createExport(paramsOrFirst, ...rest) {
|
|
12753
|
-
let params;
|
|
12754
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12755
|
-
params = paramsOrFirst || {};
|
|
12756
|
-
} else {
|
|
12757
|
-
params = {
|
|
12758
|
-
userId: paramsOrFirst,
|
|
12759
|
-
format: rest[0],
|
|
12760
|
-
includeForgotten: rest[1],
|
|
12761
|
-
includeVectors: rest[2],
|
|
12762
|
-
includeRawSources: rest[3],
|
|
12763
|
-
mode: rest[4]
|
|
12764
|
-
};
|
|
12765
|
-
}
|
|
12766
|
-
const userId = params.userId;
|
|
12767
|
-
const format = params.format;
|
|
12768
|
-
const includeForgotten = params.includeForgotten;
|
|
12769
|
-
const includeVectors = params.includeVectors;
|
|
12770
|
-
const includeRawSources = params.includeRawSources;
|
|
12771
|
-
const mode = params.mode;
|
|
12772
|
-
if (typeof userId === "undefined") {
|
|
12773
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
12774
|
-
}
|
|
12775
|
-
const apiPath = "/memory/memories/exports";
|
|
12776
|
-
const payload = {};
|
|
12777
|
-
if (typeof userId !== "undefined") {
|
|
12778
|
-
payload["userId"] = userId;
|
|
12779
|
-
}
|
|
12780
|
-
if (typeof format !== "undefined") {
|
|
12781
|
-
payload["format"] = format;
|
|
12782
|
-
}
|
|
12783
|
-
if (typeof includeForgotten !== "undefined") {
|
|
12784
|
-
payload["includeForgotten"] = includeForgotten;
|
|
12785
|
-
}
|
|
12786
|
-
if (typeof includeVectors !== "undefined") {
|
|
12787
|
-
payload["includeVectors"] = includeVectors;
|
|
12788
|
-
}
|
|
12789
|
-
if (typeof includeRawSources !== "undefined") {
|
|
12790
|
-
payload["includeRawSources"] = includeRawSources;
|
|
12791
|
-
}
|
|
12792
|
-
if (typeof mode !== "undefined") {
|
|
12793
|
-
payload["mode"] = mode;
|
|
12794
|
-
}
|
|
12795
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12796
|
-
const apiHeaders = {
|
|
12797
|
-
"content-type": "application/json"
|
|
12798
|
-
};
|
|
12799
|
-
return this.client.call(
|
|
12800
|
-
"post",
|
|
12801
|
-
uri,
|
|
12802
|
-
apiHeaders,
|
|
12803
|
-
payload
|
|
12804
|
-
);
|
|
12805
|
-
}
|
|
12806
|
-
getExportJob(paramsOrFirst) {
|
|
12807
|
-
let params;
|
|
12808
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12809
|
-
params = paramsOrFirst || {};
|
|
12810
|
-
} else {
|
|
12811
|
-
params = {
|
|
12812
|
-
exportId: paramsOrFirst
|
|
12813
|
-
};
|
|
12814
|
-
}
|
|
12815
|
-
const exportId = params.exportId;
|
|
12816
|
-
if (typeof exportId === "undefined") {
|
|
12817
|
-
throw new AppBaseException('Missing required parameter: "exportId"');
|
|
12818
|
-
}
|
|
12819
|
-
const apiPath = "/memory/memories/exports/{exportId}".replace("{exportId}", exportId);
|
|
12820
|
-
const payload = {};
|
|
12821
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12822
|
-
const apiHeaders = {};
|
|
12823
|
-
return this.client.call(
|
|
12824
|
-
"get",
|
|
12825
|
-
uri,
|
|
12826
|
-
apiHeaders,
|
|
12827
|
-
payload
|
|
12828
|
-
);
|
|
12829
|
-
}
|
|
12830
|
-
createKnowledgeFeedback(paramsOrFirst, ...rest) {
|
|
12831
|
-
let params;
|
|
12832
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12833
|
-
params = paramsOrFirst || {};
|
|
12834
|
-
} else {
|
|
12835
|
-
params = {
|
|
12836
|
-
injectionId: paramsOrFirst,
|
|
12837
|
-
knowledgeId: rest[0],
|
|
12838
|
-
revision: rest[1],
|
|
12839
|
-
feedbackType: rest[2],
|
|
12840
|
-
scope: rest[3],
|
|
12841
|
-
userId: rest[4],
|
|
12842
|
-
agentId: rest[5],
|
|
12843
|
-
sessionId: rest[6],
|
|
12844
|
-
runId: rest[7],
|
|
12845
|
-
memorySubStoreId: rest[8],
|
|
12846
|
-
reasonCode: rest[9],
|
|
12847
|
-
idempotencyKey: rest[10]
|
|
12848
|
-
};
|
|
12849
|
-
}
|
|
12850
|
-
const injectionId = params.injectionId;
|
|
12851
|
-
const knowledgeId = params.knowledgeId;
|
|
12852
|
-
const revision = params.revision;
|
|
12853
|
-
const feedbackType = params.feedbackType;
|
|
12854
|
-
const scope = params.scope;
|
|
12855
|
-
const userId = params.userId;
|
|
12856
|
-
const agentId = params.agentId;
|
|
12857
|
-
const sessionId = params.sessionId;
|
|
12858
|
-
const runId = params.runId;
|
|
12859
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12860
|
-
const reasonCode = params.reasonCode;
|
|
12861
|
-
const idempotencyKey = params.idempotencyKey;
|
|
12862
|
-
if (typeof injectionId === "undefined") {
|
|
12863
|
-
throw new AppBaseException('Missing required parameter: "injectionId"');
|
|
12864
|
-
}
|
|
12865
|
-
if (typeof knowledgeId === "undefined") {
|
|
12866
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
12867
|
-
}
|
|
12868
|
-
if (typeof revision === "undefined") {
|
|
12869
|
-
throw new AppBaseException('Missing required parameter: "revision"');
|
|
12870
|
-
}
|
|
12871
|
-
if (typeof feedbackType === "undefined") {
|
|
12872
|
-
throw new AppBaseException('Missing required parameter: "feedbackType"');
|
|
12873
|
-
}
|
|
12874
|
-
const apiPath = "/memory/memories/feedback";
|
|
12875
|
-
const payload = {};
|
|
12876
|
-
if (typeof scope !== "undefined") {
|
|
12877
|
-
payload["scope"] = scope;
|
|
12878
|
-
}
|
|
12879
|
-
if (typeof userId !== "undefined") {
|
|
12880
|
-
payload["userId"] = userId;
|
|
12881
|
-
}
|
|
12882
|
-
if (typeof agentId !== "undefined") {
|
|
12883
|
-
payload["agentId"] = agentId;
|
|
12884
|
-
}
|
|
12885
|
-
if (typeof sessionId !== "undefined") {
|
|
12886
|
-
payload["sessionId"] = sessionId;
|
|
12887
|
-
}
|
|
12888
|
-
if (typeof runId !== "undefined") {
|
|
12889
|
-
payload["runId"] = runId;
|
|
12890
|
-
}
|
|
12891
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12892
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12893
|
-
}
|
|
12894
|
-
if (typeof injectionId !== "undefined") {
|
|
12895
|
-
payload["injectionId"] = injectionId;
|
|
12896
|
-
}
|
|
12897
|
-
if (typeof knowledgeId !== "undefined") {
|
|
12898
|
-
payload["knowledgeId"] = knowledgeId;
|
|
12899
|
-
}
|
|
12900
|
-
if (typeof revision !== "undefined") {
|
|
12901
|
-
payload["revision"] = revision;
|
|
12902
|
-
}
|
|
12903
|
-
if (typeof feedbackType !== "undefined") {
|
|
12904
|
-
payload["feedbackType"] = feedbackType;
|
|
12905
|
-
}
|
|
12906
|
-
if (typeof reasonCode !== "undefined") {
|
|
12907
|
-
payload["reasonCode"] = reasonCode;
|
|
12908
|
-
}
|
|
12909
|
-
if (typeof idempotencyKey !== "undefined") {
|
|
12910
|
-
payload["idempotencyKey"] = idempotencyKey;
|
|
12911
|
-
}
|
|
12912
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12913
|
-
const apiHeaders = {
|
|
12914
|
-
"content-type": "application/json"
|
|
12915
|
-
};
|
|
12916
|
-
return this.client.call(
|
|
12917
|
-
"post",
|
|
12918
|
-
uri,
|
|
12919
|
-
apiHeaders,
|
|
12920
|
-
payload
|
|
12921
|
-
);
|
|
12922
|
-
}
|
|
12923
|
-
createImport(paramsOrFirst, ...rest) {
|
|
12924
|
-
let params;
|
|
12925
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12926
|
-
params = paramsOrFirst || {};
|
|
12927
|
-
} else {
|
|
12928
|
-
params = {
|
|
12929
|
-
userId: paramsOrFirst,
|
|
12930
|
-
format: rest[0],
|
|
12931
|
-
data: rest[1],
|
|
12932
|
-
records: rest[2],
|
|
12933
|
-
dryRun: rest[3]
|
|
12934
|
-
};
|
|
12935
|
-
}
|
|
12936
|
-
const userId = params.userId;
|
|
12937
|
-
const format = params.format;
|
|
12938
|
-
const data = params.data;
|
|
12939
|
-
const records = params.records;
|
|
12940
|
-
const dryRun = params.dryRun;
|
|
12941
|
-
if (typeof userId === "undefined") {
|
|
12942
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
12943
|
-
}
|
|
12944
|
-
const apiPath = "/memory/memories/imports";
|
|
12945
|
-
const payload = {};
|
|
12946
|
-
if (typeof userId !== "undefined") {
|
|
12947
|
-
payload["userId"] = userId;
|
|
12948
|
-
}
|
|
12949
|
-
if (typeof format !== "undefined") {
|
|
12950
|
-
payload["format"] = format;
|
|
12951
|
-
}
|
|
12952
|
-
if (typeof data !== "undefined") {
|
|
12953
|
-
payload["data"] = data;
|
|
12954
|
-
}
|
|
12955
|
-
if (typeof records !== "undefined") {
|
|
12956
|
-
payload["records"] = records;
|
|
12957
|
-
}
|
|
12958
|
-
if (typeof dryRun !== "undefined") {
|
|
12959
|
-
payload["dryRun"] = dryRun;
|
|
12960
|
-
}
|
|
12961
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12962
|
-
const apiHeaders = {
|
|
12963
|
-
"content-type": "application/json"
|
|
12964
|
-
};
|
|
12965
|
-
return this.client.call(
|
|
12966
|
-
"post",
|
|
12967
|
-
uri,
|
|
12968
|
-
apiHeaders,
|
|
12969
|
-
payload
|
|
12970
|
-
);
|
|
12971
|
-
}
|
|
12972
|
-
getImport(paramsOrFirst) {
|
|
12973
|
-
let params;
|
|
12974
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12975
|
-
params = paramsOrFirst || {};
|
|
12976
|
-
} else {
|
|
12977
|
-
params = {
|
|
12978
|
-
importId: paramsOrFirst
|
|
12979
|
-
};
|
|
12980
|
-
}
|
|
12981
|
-
const importId = params.importId;
|
|
12982
|
-
if (typeof importId === "undefined") {
|
|
12983
|
-
throw new AppBaseException('Missing required parameter: "importId"');
|
|
12984
|
-
}
|
|
12985
|
-
const apiPath = "/memory/memories/imports/{importId}".replace("{importId}", importId);
|
|
12986
|
-
const payload = {};
|
|
12987
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12988
|
-
const apiHeaders = {};
|
|
12989
|
-
return this.client.call(
|
|
12990
|
-
"get",
|
|
12991
|
-
uri,
|
|
12992
|
-
apiHeaders,
|
|
12993
|
-
payload
|
|
12994
|
-
);
|
|
12995
|
-
}
|
|
12996
|
-
updateKnowledge(paramsOrFirst, ...rest) {
|
|
12997
|
-
let params;
|
|
12998
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12999
|
-
params = paramsOrFirst || {};
|
|
13000
|
-
} else {
|
|
13001
|
-
params = {
|
|
13002
|
-
knowledgeId: paramsOrFirst,
|
|
13003
|
-
expectedVersion: rest[0],
|
|
13004
|
-
scope: rest[1],
|
|
13005
|
-
userId: rest[2],
|
|
13006
|
-
agentId: rest[3],
|
|
13007
|
-
sessionId: rest[4],
|
|
13008
|
-
runId: rest[5],
|
|
13009
|
-
memorySubStoreId: rest[6],
|
|
13010
|
-
status: rest[7],
|
|
13011
|
-
validationStatus: rest[8]
|
|
13012
|
-
};
|
|
13013
|
-
}
|
|
13014
|
-
const knowledgeId = params.knowledgeId;
|
|
13015
|
-
const expectedVersion = params.expectedVersion;
|
|
13016
|
-
const scope = params.scope;
|
|
13017
|
-
const userId = params.userId;
|
|
13018
|
-
const agentId = params.agentId;
|
|
13019
|
-
const sessionId = params.sessionId;
|
|
13020
|
-
const runId = params.runId;
|
|
13021
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13022
|
-
const status = params.status;
|
|
13023
|
-
const validationStatus = params.validationStatus;
|
|
13024
|
-
if (typeof knowledgeId === "undefined") {
|
|
13025
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13026
|
-
}
|
|
13027
|
-
if (typeof expectedVersion === "undefined") {
|
|
13028
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
13029
|
-
}
|
|
13030
|
-
const apiPath = "/memory/memories/knowledge/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
13031
|
-
const payload = {};
|
|
13032
|
-
if (typeof scope !== "undefined") {
|
|
13033
|
-
payload["scope"] = scope;
|
|
13034
|
-
}
|
|
13035
|
-
if (typeof userId !== "undefined") {
|
|
13036
|
-
payload["userId"] = userId;
|
|
13037
|
-
}
|
|
13038
|
-
if (typeof agentId !== "undefined") {
|
|
13039
|
-
payload["agentId"] = agentId;
|
|
13040
|
-
}
|
|
13041
|
-
if (typeof sessionId !== "undefined") {
|
|
13042
|
-
payload["sessionId"] = sessionId;
|
|
13043
|
-
}
|
|
13044
|
-
if (typeof runId !== "undefined") {
|
|
13045
|
-
payload["runId"] = runId;
|
|
13046
|
-
}
|
|
13047
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13048
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13049
|
-
}
|
|
13050
|
-
if (typeof expectedVersion !== "undefined") {
|
|
13051
|
-
payload["expectedVersion"] = expectedVersion;
|
|
13052
|
-
}
|
|
13053
|
-
if (typeof status !== "undefined") {
|
|
13054
|
-
payload["status"] = status;
|
|
13055
|
-
}
|
|
13056
|
-
if (typeof validationStatus !== "undefined") {
|
|
13057
|
-
payload["validationStatus"] = validationStatus;
|
|
13058
|
-
}
|
|
13059
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13060
|
-
const apiHeaders = {
|
|
13061
|
-
"content-type": "application/json"
|
|
13062
|
-
};
|
|
13063
|
-
return this.client.call(
|
|
13064
|
-
"patch",
|
|
13065
|
-
uri,
|
|
13066
|
-
apiHeaders,
|
|
13067
|
-
payload
|
|
13068
|
-
);
|
|
13069
|
-
}
|
|
13070
|
-
forgetKnowledge(paramsOrFirst, ...rest) {
|
|
13071
|
-
let params;
|
|
13072
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13073
|
-
params = paramsOrFirst || {};
|
|
13074
|
-
} else {
|
|
13075
|
-
params = {
|
|
13076
|
-
knowledgeId: paramsOrFirst,
|
|
13077
|
-
expectedVersion: rest[0],
|
|
13078
|
-
scope: rest[1],
|
|
13079
|
-
userId: rest[2],
|
|
13080
|
-
agentId: rest[3],
|
|
13081
|
-
sessionId: rest[4],
|
|
13082
|
-
runId: rest[5],
|
|
13083
|
-
memorySubStoreId: rest[6],
|
|
13084
|
-
reason: rest[7],
|
|
13085
|
-
source: rest[8]
|
|
13086
|
-
};
|
|
13087
|
-
}
|
|
13088
|
-
const knowledgeId = params.knowledgeId;
|
|
13089
|
-
const expectedVersion = params.expectedVersion;
|
|
13090
|
-
const scope = params.scope;
|
|
13091
|
-
const userId = params.userId;
|
|
13092
|
-
const agentId = params.agentId;
|
|
13093
|
-
const sessionId = params.sessionId;
|
|
13094
|
-
const runId = params.runId;
|
|
13095
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13096
|
-
const reason = params.reason;
|
|
13097
|
-
const source = params.source;
|
|
13098
|
-
if (typeof knowledgeId === "undefined") {
|
|
13099
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13100
|
-
}
|
|
13101
|
-
if (typeof expectedVersion === "undefined") {
|
|
13102
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
13103
|
-
}
|
|
13104
|
-
const apiPath = "/memory/memories/knowledge/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
13105
|
-
const payload = {};
|
|
13106
|
-
if (typeof scope !== "undefined") {
|
|
13107
|
-
payload["scope"] = scope;
|
|
13108
|
-
}
|
|
13109
|
-
if (typeof userId !== "undefined") {
|
|
13110
|
-
payload["userId"] = userId;
|
|
13111
|
-
}
|
|
13112
|
-
if (typeof agentId !== "undefined") {
|
|
13113
|
-
payload["agentId"] = agentId;
|
|
13114
|
-
}
|
|
13115
|
-
if (typeof sessionId !== "undefined") {
|
|
13116
|
-
payload["sessionId"] = sessionId;
|
|
13117
|
-
}
|
|
13118
|
-
if (typeof runId !== "undefined") {
|
|
13119
|
-
payload["runId"] = runId;
|
|
13120
|
-
}
|
|
13121
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13122
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13123
|
-
}
|
|
13124
|
-
if (typeof expectedVersion !== "undefined") {
|
|
13125
|
-
payload["expectedVersion"] = expectedVersion;
|
|
13126
|
-
}
|
|
13127
|
-
if (typeof reason !== "undefined") {
|
|
13128
|
-
payload["reason"] = reason;
|
|
13129
|
-
}
|
|
13130
|
-
if (typeof source !== "undefined") {
|
|
13131
|
-
payload["source"] = source;
|
|
13132
|
-
}
|
|
13133
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13134
|
-
const apiHeaders = {
|
|
13135
|
-
"content-type": "application/json"
|
|
13136
|
-
};
|
|
13137
|
-
return this.client.call(
|
|
13138
|
-
"delete",
|
|
13139
|
-
uri,
|
|
13140
|
-
apiHeaders,
|
|
13141
|
-
payload
|
|
13142
|
-
);
|
|
13143
|
-
}
|
|
13144
|
-
createKnowledgeObservation(paramsOrFirst, ...rest) {
|
|
13145
|
-
let params;
|
|
13146
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13147
|
-
params = paramsOrFirst || {};
|
|
13148
|
-
} else {
|
|
13149
|
-
params = {
|
|
13150
|
-
knowledgeId: paramsOrFirst,
|
|
13151
|
-
revision: rest[0],
|
|
13152
|
-
outcome: rest[1],
|
|
13153
|
-
evidence: rest[2],
|
|
13154
|
-
scope: rest[3],
|
|
13155
|
-
userId: rest[4],
|
|
13156
|
-
agentId: rest[5],
|
|
13157
|
-
sessionId: rest[6],
|
|
13158
|
-
runId: rest[7],
|
|
13159
|
-
memorySubStoreId: rest[8],
|
|
13160
|
-
sourceId: rest[9],
|
|
13161
|
-
injectionId: rest[10],
|
|
13162
|
-
verificationSource: rest[11],
|
|
13163
|
-
toolName: rest[12],
|
|
13164
|
-
toolVersion: rest[13],
|
|
13165
|
-
toolSchemaVersion: rest[14],
|
|
13166
|
-
errorFingerprint: rest[15],
|
|
13167
|
-
weight: rest[16],
|
|
13168
|
-
observedAt: rest[17],
|
|
13169
|
-
idempotencyKey: rest[18]
|
|
13170
|
-
};
|
|
13171
|
-
}
|
|
13172
|
-
const knowledgeId = params.knowledgeId;
|
|
13173
|
-
const revision = params.revision;
|
|
13174
|
-
const outcome = params.outcome;
|
|
13175
|
-
const evidence = params.evidence;
|
|
13176
|
-
const scope = params.scope;
|
|
13177
|
-
const userId = params.userId;
|
|
13178
|
-
const agentId = params.agentId;
|
|
13179
|
-
const sessionId = params.sessionId;
|
|
13180
|
-
const runId = params.runId;
|
|
13181
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13182
|
-
const sourceId = params.sourceId;
|
|
13183
|
-
const injectionId = params.injectionId;
|
|
13184
|
-
const verificationSource = params.verificationSource;
|
|
13185
|
-
const toolName = params.toolName;
|
|
13186
|
-
const toolVersion = params.toolVersion;
|
|
13187
|
-
const toolSchemaVersion = params.toolSchemaVersion;
|
|
13188
|
-
const errorFingerprint = params.errorFingerprint;
|
|
13189
|
-
const weight = params.weight;
|
|
13190
|
-
const observedAt = params.observedAt;
|
|
13191
|
-
const idempotencyKey = params.idempotencyKey;
|
|
13192
|
-
if (typeof knowledgeId === "undefined") {
|
|
13193
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13194
|
-
}
|
|
13195
|
-
if (typeof revision === "undefined") {
|
|
13196
|
-
throw new AppBaseException('Missing required parameter: "revision"');
|
|
13197
|
-
}
|
|
13198
|
-
if (typeof outcome === "undefined") {
|
|
13199
|
-
throw new AppBaseException('Missing required parameter: "outcome"');
|
|
13200
|
-
}
|
|
13201
|
-
if (typeof evidence === "undefined") {
|
|
13202
|
-
throw new AppBaseException('Missing required parameter: "evidence"');
|
|
13203
|
-
}
|
|
13204
|
-
const apiPath = "/memory/memories/observations";
|
|
13205
|
-
const payload = {};
|
|
13206
|
-
if (typeof scope !== "undefined") {
|
|
13207
|
-
payload["scope"] = scope;
|
|
13208
|
-
}
|
|
13209
|
-
if (typeof userId !== "undefined") {
|
|
13210
|
-
payload["userId"] = userId;
|
|
13211
|
-
}
|
|
13212
|
-
if (typeof agentId !== "undefined") {
|
|
13213
|
-
payload["agentId"] = agentId;
|
|
13214
|
-
}
|
|
13215
|
-
if (typeof sessionId !== "undefined") {
|
|
13216
|
-
payload["sessionId"] = sessionId;
|
|
13217
|
-
}
|
|
13218
|
-
if (typeof runId !== "undefined") {
|
|
13219
|
-
payload["runId"] = runId;
|
|
13220
|
-
}
|
|
13221
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13222
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13223
|
-
}
|
|
13224
|
-
if (typeof knowledgeId !== "undefined") {
|
|
13225
|
-
payload["knowledgeId"] = knowledgeId;
|
|
13226
|
-
}
|
|
13227
|
-
if (typeof revision !== "undefined") {
|
|
13228
|
-
payload["revision"] = revision;
|
|
13229
|
-
}
|
|
13230
|
-
if (typeof sourceId !== "undefined") {
|
|
13231
|
-
payload["sourceId"] = sourceId;
|
|
13232
|
-
}
|
|
13233
|
-
if (typeof injectionId !== "undefined") {
|
|
13234
|
-
payload["injectionId"] = injectionId;
|
|
13235
|
-
}
|
|
13236
|
-
if (typeof outcome !== "undefined") {
|
|
13237
|
-
payload["outcome"] = outcome;
|
|
13238
|
-
}
|
|
13239
|
-
if (typeof verificationSource !== "undefined") {
|
|
13240
|
-
payload["verificationSource"] = verificationSource;
|
|
13241
|
-
}
|
|
13242
|
-
if (typeof toolName !== "undefined") {
|
|
13243
|
-
payload["toolName"] = toolName;
|
|
13244
|
-
}
|
|
13245
|
-
if (typeof toolVersion !== "undefined") {
|
|
13246
|
-
payload["toolVersion"] = toolVersion;
|
|
13247
|
-
}
|
|
13248
|
-
if (typeof toolSchemaVersion !== "undefined") {
|
|
13249
|
-
payload["toolSchemaVersion"] = toolSchemaVersion;
|
|
13250
|
-
}
|
|
13251
|
-
if (typeof errorFingerprint !== "undefined") {
|
|
13252
|
-
payload["errorFingerprint"] = errorFingerprint;
|
|
13253
|
-
}
|
|
13254
|
-
if (typeof evidence !== "undefined") {
|
|
13255
|
-
payload["evidence"] = evidence;
|
|
13256
|
-
}
|
|
13257
|
-
if (typeof weight !== "undefined") {
|
|
13258
|
-
payload["weight"] = weight;
|
|
13259
|
-
}
|
|
13260
|
-
if (typeof observedAt !== "undefined") {
|
|
13261
|
-
payload["observedAt"] = observedAt;
|
|
13262
|
-
}
|
|
13263
|
-
if (typeof idempotencyKey !== "undefined") {
|
|
13264
|
-
payload["idempotencyKey"] = idempotencyKey;
|
|
13265
|
-
}
|
|
13266
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13267
|
-
const apiHeaders = {
|
|
13268
|
-
"content-type": "application/json"
|
|
13269
|
-
};
|
|
13270
|
-
return this.client.call(
|
|
13271
|
-
"post",
|
|
13272
|
-
uri,
|
|
13273
|
-
apiHeaders,
|
|
13274
|
-
payload
|
|
13275
|
-
);
|
|
13276
|
-
}
|
|
13277
|
-
createProjectionRebuild(paramsOrFirst, ...rest) {
|
|
13278
|
-
let params;
|
|
13279
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("routes" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst || "dryRun" in paramsOrFirst)) {
|
|
13280
|
-
params = paramsOrFirst || {};
|
|
13281
|
-
} else {
|
|
13282
|
-
params = {
|
|
13283
|
-
routes: paramsOrFirst,
|
|
13284
|
-
cursor: rest[0],
|
|
13285
|
-
limit: rest[1],
|
|
13286
|
-
dryRun: rest[2]
|
|
13287
|
-
};
|
|
13288
|
-
}
|
|
13289
|
-
const routes = params.routes;
|
|
13290
|
-
const cursor = params.cursor;
|
|
13291
|
-
const limit = params.limit;
|
|
13292
|
-
const dryRun = params.dryRun;
|
|
13293
|
-
if (typeof routes === "undefined") {
|
|
13294
|
-
throw new AppBaseException('Missing required parameter: "routes"');
|
|
13295
|
-
}
|
|
13296
|
-
const apiPath = "/memory/memories/projections/rebuild";
|
|
13297
|
-
const payload = {};
|
|
13298
|
-
if (typeof routes !== "undefined") {
|
|
13299
|
-
payload["routes"] = routes;
|
|
13300
|
-
}
|
|
13301
|
-
if (typeof cursor !== "undefined") {
|
|
13302
|
-
payload["cursor"] = cursor;
|
|
13303
|
-
}
|
|
13304
|
-
if (typeof limit !== "undefined") {
|
|
13305
|
-
payload["limit"] = limit;
|
|
13306
|
-
}
|
|
13307
|
-
if (typeof dryRun !== "undefined") {
|
|
13308
|
-
payload["dryRun"] = dryRun;
|
|
13309
|
-
}
|
|
13310
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13311
|
-
const apiHeaders = {
|
|
13312
|
-
"content-type": "application/json"
|
|
13313
|
-
};
|
|
13314
|
-
return this.client.call(
|
|
13315
|
-
"post",
|
|
13316
|
-
uri,
|
|
13317
|
-
apiHeaders,
|
|
13318
|
-
payload
|
|
13319
|
-
);
|
|
13320
|
-
}
|
|
13321
|
-
/**
|
|
13322
|
-
* Get project memory projection recovery verification.
|
|
13323
|
-
*
|
|
13324
|
-
* @throws {AppBaseException}
|
|
13325
|
-
* @returns {Promise<{}>}
|
|
13326
|
-
*/
|
|
13327
|
-
getProjectionVerification() {
|
|
13328
|
-
const apiPath = "/memory/memories/projections/verification";
|
|
13329
|
-
const payload = {};
|
|
13330
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13331
|
-
const apiHeaders = {};
|
|
13332
|
-
return this.client.call(
|
|
13333
|
-
"get",
|
|
13334
|
-
uri,
|
|
13335
|
-
apiHeaders,
|
|
13336
|
-
payload
|
|
13337
|
-
);
|
|
13338
|
-
}
|
|
13339
|
-
/**
|
|
13340
|
-
* Get a memory quality report.
|
|
13341
|
-
*
|
|
13342
|
-
* @throws {AppBaseException}
|
|
13343
|
-
* @returns {Promise<{}>}
|
|
13344
|
-
*/
|
|
13345
|
-
getQuality() {
|
|
13346
|
-
const apiPath = "/memory/memories/quality";
|
|
13347
|
-
const payload = {};
|
|
13348
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13349
|
-
const apiHeaders = {};
|
|
13350
|
-
return this.client.call(
|
|
13351
|
-
"get",
|
|
13352
|
-
uri,
|
|
13353
|
-
apiHeaders,
|
|
13354
|
-
payload
|
|
13355
|
-
);
|
|
13356
|
-
}
|
|
13357
|
-
recallKnowledge(paramsOrFirst, ...rest) {
|
|
13358
|
-
let params;
|
|
13359
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13360
|
-
params = paramsOrFirst || {};
|
|
13361
|
-
} else {
|
|
13362
|
-
params = {
|
|
13363
|
-
query: paramsOrFirst,
|
|
13364
|
-
scope: rest[0],
|
|
13365
|
-
userId: rest[1],
|
|
13366
|
-
agentId: rest[2],
|
|
13367
|
-
sessionId: rest[3],
|
|
13368
|
-
runId: rest[4],
|
|
13369
|
-
memorySubStoreId: rest[5],
|
|
13370
|
-
kinds: rest[6],
|
|
13371
|
-
limit: rest[7],
|
|
13372
|
-
tokenBudget: rest[8],
|
|
13373
|
-
retrieval: rest[9],
|
|
13374
|
-
accessMode: rest[10]
|
|
13375
|
-
};
|
|
13376
|
-
}
|
|
13377
|
-
const query = params.query;
|
|
13378
|
-
const scope = params.scope;
|
|
13379
|
-
const userId = params.userId;
|
|
13380
|
-
const agentId = params.agentId;
|
|
13381
|
-
const sessionId = params.sessionId;
|
|
13382
|
-
const runId = params.runId;
|
|
13383
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13384
|
-
const kinds = params.kinds;
|
|
13385
|
-
const limit = params.limit;
|
|
13386
|
-
const tokenBudget = params.tokenBudget;
|
|
13387
|
-
const retrieval = params.retrieval;
|
|
13388
|
-
const accessMode = params.accessMode;
|
|
13389
|
-
if (typeof query === "undefined") {
|
|
13390
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
13391
|
-
}
|
|
13392
|
-
const apiPath = "/memory/memories/recall";
|
|
13393
|
-
const payload = {};
|
|
13394
|
-
if (typeof scope !== "undefined") {
|
|
13395
|
-
payload["scope"] = scope;
|
|
13396
|
-
}
|
|
13397
|
-
if (typeof userId !== "undefined") {
|
|
13398
|
-
payload["userId"] = userId;
|
|
13399
|
-
}
|
|
13400
|
-
if (typeof agentId !== "undefined") {
|
|
13401
|
-
payload["agentId"] = agentId;
|
|
13402
|
-
}
|
|
13403
|
-
if (typeof sessionId !== "undefined") {
|
|
13404
|
-
payload["sessionId"] = sessionId;
|
|
13405
|
-
}
|
|
13406
|
-
if (typeof runId !== "undefined") {
|
|
13407
|
-
payload["runId"] = runId;
|
|
13408
|
-
}
|
|
13409
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13410
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13411
|
-
}
|
|
13412
|
-
if (typeof query !== "undefined") {
|
|
13413
|
-
payload["query"] = query;
|
|
13414
|
-
}
|
|
13415
|
-
if (typeof kinds !== "undefined") {
|
|
13416
|
-
payload["kinds"] = kinds;
|
|
13417
|
-
}
|
|
13418
|
-
if (typeof limit !== "undefined") {
|
|
13419
|
-
payload["limit"] = limit;
|
|
13420
|
-
}
|
|
13421
|
-
if (typeof tokenBudget !== "undefined") {
|
|
13422
|
-
payload["tokenBudget"] = tokenBudget;
|
|
13423
|
-
}
|
|
13424
|
-
if (typeof retrieval !== "undefined") {
|
|
13425
|
-
payload["retrieval"] = retrieval;
|
|
13426
|
-
}
|
|
13427
|
-
if (typeof accessMode !== "undefined") {
|
|
13428
|
-
payload["accessMode"] = accessMode;
|
|
13429
|
-
}
|
|
13430
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13431
|
-
const apiHeaders = {
|
|
13432
|
-
"content-type": "application/json"
|
|
13433
|
-
};
|
|
13434
|
-
return this.client.call(
|
|
13435
|
-
"post",
|
|
13436
|
-
uri,
|
|
13437
|
-
apiHeaders,
|
|
13438
|
-
payload
|
|
13439
|
-
);
|
|
13440
|
-
}
|
|
13441
|
-
search(paramsOrFirst, ...rest) {
|
|
13442
|
-
let params;
|
|
13443
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13444
|
-
params = paramsOrFirst || {};
|
|
13445
|
-
} else {
|
|
13446
|
-
params = {
|
|
13447
|
-
query: paramsOrFirst,
|
|
13448
|
-
searchMode: rest[0],
|
|
13449
|
-
retrieval: rest[1],
|
|
13450
|
-
userId: rest[2],
|
|
13451
|
-
agentId: rest[3],
|
|
13452
|
-
runId: rest[4],
|
|
13453
|
-
scope: rest[5],
|
|
13454
|
-
memoryType: rest[6],
|
|
13455
|
-
recordKind: rest[7],
|
|
13456
|
-
filter: rest[8],
|
|
13457
|
-
limit: rest[9],
|
|
13458
|
-
cursor: rest[10],
|
|
13459
|
-
sort: rest[11],
|
|
13460
|
-
memorySubStoreId: rest[12],
|
|
13461
|
-
sessionId: rest[13],
|
|
13462
|
-
groupId: rest[14],
|
|
13463
|
-
accessMode: rest[15]
|
|
13464
|
-
};
|
|
13465
|
-
}
|
|
13466
|
-
const query = params.query;
|
|
13467
|
-
const searchMode = params.searchMode;
|
|
13468
|
-
const retrieval = params.retrieval;
|
|
13469
|
-
const userId = params.userId;
|
|
13470
|
-
const agentId = params.agentId;
|
|
13471
|
-
const runId = params.runId;
|
|
13472
|
-
const scope = params.scope;
|
|
13473
|
-
const memoryType = params.memoryType;
|
|
13474
|
-
const recordKind = params.recordKind;
|
|
13475
|
-
const filter = params.filter;
|
|
13476
|
-
const limit = params.limit;
|
|
13477
|
-
const cursor = params.cursor;
|
|
13478
|
-
const sort = params.sort;
|
|
13479
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13480
|
-
const sessionId = params.sessionId;
|
|
13481
|
-
const groupId = params.groupId;
|
|
13482
|
-
const accessMode = params.accessMode;
|
|
13483
|
-
if (typeof query === "undefined") {
|
|
13484
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
13485
|
-
}
|
|
13486
|
-
const apiPath = "/memory/memories/search";
|
|
13487
|
-
const payload = {};
|
|
13488
|
-
if (typeof query !== "undefined") {
|
|
13489
|
-
payload["query"] = query;
|
|
13490
|
-
}
|
|
13491
|
-
if (typeof searchMode !== "undefined") {
|
|
13492
|
-
payload["searchMode"] = searchMode;
|
|
13493
|
-
}
|
|
13494
|
-
if (typeof retrieval !== "undefined") {
|
|
13495
|
-
payload["retrieval"] = retrieval;
|
|
13496
|
-
}
|
|
13497
|
-
if (typeof userId !== "undefined") {
|
|
13498
|
-
payload["userId"] = userId;
|
|
13499
|
-
}
|
|
13500
|
-
if (typeof agentId !== "undefined") {
|
|
13501
|
-
payload["agentId"] = agentId;
|
|
13502
|
-
}
|
|
13503
|
-
if (typeof runId !== "undefined") {
|
|
13504
|
-
payload["runId"] = runId;
|
|
13505
|
-
}
|
|
13506
|
-
if (typeof scope !== "undefined") {
|
|
13507
|
-
payload["scope"] = scope;
|
|
13508
|
-
}
|
|
13509
|
-
if (typeof memoryType !== "undefined") {
|
|
13510
|
-
payload["memoryType"] = memoryType;
|
|
13511
|
-
}
|
|
13512
|
-
if (typeof recordKind !== "undefined") {
|
|
13513
|
-
payload["recordKind"] = recordKind;
|
|
13514
|
-
}
|
|
13515
|
-
if (typeof filter !== "undefined") {
|
|
13516
|
-
payload["filter"] = filter;
|
|
13517
|
-
}
|
|
13518
|
-
if (typeof limit !== "undefined") {
|
|
13519
|
-
payload["limit"] = limit;
|
|
13520
|
-
}
|
|
13521
|
-
if (typeof cursor !== "undefined") {
|
|
13522
|
-
payload["cursor"] = cursor;
|
|
13523
|
-
}
|
|
13524
|
-
if (typeof sort !== "undefined") {
|
|
13525
|
-
payload["sort"] = sort;
|
|
13526
|
-
}
|
|
13527
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13528
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13529
|
-
}
|
|
13530
|
-
if (typeof sessionId !== "undefined") {
|
|
13531
|
-
payload["sessionId"] = sessionId;
|
|
13532
|
-
}
|
|
13533
|
-
if (typeof groupId !== "undefined") {
|
|
13534
|
-
payload["groupId"] = groupId;
|
|
13535
|
-
}
|
|
13536
|
-
if (typeof accessMode !== "undefined") {
|
|
13537
|
-
payload["accessMode"] = accessMode;
|
|
13538
|
-
}
|
|
13539
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13540
|
-
const apiHeaders = {
|
|
13541
|
-
"content-type": "application/json"
|
|
13542
|
-
};
|
|
13543
|
-
return this.client.call(
|
|
13544
|
-
"post",
|
|
13545
|
-
uri,
|
|
13546
|
-
apiHeaders,
|
|
13547
|
-
payload
|
|
13548
|
-
);
|
|
13549
|
-
}
|
|
13550
|
-
/**
|
|
13551
|
-
* Get memory session aggregates.
|
|
13552
|
-
*
|
|
13553
|
-
* @throws {AppBaseException}
|
|
13554
|
-
* @returns {Promise<{}>}
|
|
13555
|
-
*/
|
|
13556
|
-
getSessions() {
|
|
13557
|
-
const apiPath = "/memory/memories/sessions";
|
|
13558
|
-
const payload = {};
|
|
13559
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13560
|
-
const apiHeaders = {};
|
|
13561
|
-
return this.client.call(
|
|
13562
|
-
"get",
|
|
13563
|
-
uri,
|
|
13564
|
-
apiHeaders,
|
|
13565
|
-
payload
|
|
13566
|
-
);
|
|
13567
|
-
}
|
|
13568
|
-
listSkills(paramsOrFirst, ...rest) {
|
|
13569
|
-
let params;
|
|
13570
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
13571
|
-
params = paramsOrFirst || {};
|
|
13572
|
-
} else {
|
|
13573
|
-
params = {
|
|
13574
|
-
scope: paramsOrFirst,
|
|
13575
|
-
userId: rest[0],
|
|
13576
|
-
agentId: rest[1],
|
|
13577
|
-
sessionId: rest[2],
|
|
13578
|
-
runId: rest[3],
|
|
13579
|
-
memorySubStoreId: rest[4],
|
|
13580
|
-
cursor: rest[5],
|
|
13581
|
-
limit: rest[6]
|
|
13582
|
-
};
|
|
13583
|
-
}
|
|
13584
|
-
const scope = params.scope;
|
|
13585
|
-
const userId = params.userId;
|
|
13586
|
-
const agentId = params.agentId;
|
|
13587
|
-
const sessionId = params.sessionId;
|
|
13588
|
-
const runId = params.runId;
|
|
13589
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13590
|
-
const cursor = params.cursor;
|
|
13591
|
-
const limit = params.limit;
|
|
13592
|
-
const apiPath = "/memory/memories/skills";
|
|
13593
|
-
const payload = {};
|
|
13594
|
-
if (typeof scope !== "undefined") {
|
|
13595
|
-
payload["scope"] = scope;
|
|
13596
|
-
}
|
|
13597
|
-
if (typeof userId !== "undefined") {
|
|
13598
|
-
payload["userId"] = userId;
|
|
13599
|
-
}
|
|
13600
|
-
if (typeof agentId !== "undefined") {
|
|
13601
|
-
payload["agentId"] = agentId;
|
|
13602
|
-
}
|
|
13603
|
-
if (typeof sessionId !== "undefined") {
|
|
13604
|
-
payload["sessionId"] = sessionId;
|
|
13605
|
-
}
|
|
13606
|
-
if (typeof runId !== "undefined") {
|
|
13607
|
-
payload["runId"] = runId;
|
|
13608
|
-
}
|
|
13609
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13610
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13611
|
-
}
|
|
13612
|
-
if (typeof cursor !== "undefined") {
|
|
13613
|
-
payload["cursor"] = cursor;
|
|
13614
|
-
}
|
|
13615
|
-
if (typeof limit !== "undefined") {
|
|
13616
|
-
payload["limit"] = limit;
|
|
13617
|
-
}
|
|
13618
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13619
|
-
const apiHeaders = {};
|
|
13620
|
-
return this.client.call(
|
|
13621
|
-
"get",
|
|
13622
|
-
uri,
|
|
13623
|
-
apiHeaders,
|
|
13624
|
-
payload
|
|
13625
|
-
);
|
|
13626
|
-
}
|
|
13627
|
-
searchSkills(paramsOrFirst, ...rest) {
|
|
13628
|
-
let params;
|
|
13629
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13630
|
-
params = paramsOrFirst || {};
|
|
13631
|
-
} else {
|
|
13632
|
-
params = {
|
|
13633
|
-
query: paramsOrFirst,
|
|
13634
|
-
scope: rest[0],
|
|
13635
|
-
userId: rest[1],
|
|
13636
|
-
agentId: rest[2],
|
|
13637
|
-
sessionId: rest[3],
|
|
13638
|
-
runId: rest[4],
|
|
13639
|
-
memorySubStoreId: rest[5],
|
|
13640
|
-
cursor: rest[6],
|
|
13641
|
-
limit: rest[7],
|
|
13642
|
-
retrieval: rest[8]
|
|
13643
|
-
};
|
|
13644
|
-
}
|
|
13645
|
-
const query = params.query;
|
|
13646
|
-
const scope = params.scope;
|
|
13647
|
-
const userId = params.userId;
|
|
13648
|
-
const agentId = params.agentId;
|
|
13649
|
-
const sessionId = params.sessionId;
|
|
13650
|
-
const runId = params.runId;
|
|
13651
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13652
|
-
const cursor = params.cursor;
|
|
13653
|
-
const limit = params.limit;
|
|
13654
|
-
const retrieval = params.retrieval;
|
|
13655
|
-
if (typeof query === "undefined") {
|
|
13656
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
13657
|
-
}
|
|
13658
|
-
const apiPath = "/memory/memories/skills/search";
|
|
13659
|
-
const payload = {};
|
|
13660
|
-
if (typeof scope !== "undefined") {
|
|
13661
|
-
payload["scope"] = scope;
|
|
13662
|
-
}
|
|
13663
|
-
if (typeof userId !== "undefined") {
|
|
13664
|
-
payload["userId"] = userId;
|
|
13665
|
-
}
|
|
13666
|
-
if (typeof agentId !== "undefined") {
|
|
13667
|
-
payload["agentId"] = agentId;
|
|
13668
|
-
}
|
|
13669
|
-
if (typeof sessionId !== "undefined") {
|
|
13670
|
-
payload["sessionId"] = sessionId;
|
|
13671
|
-
}
|
|
13672
|
-
if (typeof runId !== "undefined") {
|
|
13673
|
-
payload["runId"] = runId;
|
|
13674
|
-
}
|
|
13675
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13676
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13677
|
-
}
|
|
13678
|
-
if (typeof query !== "undefined") {
|
|
13679
|
-
payload["query"] = query;
|
|
13680
|
-
}
|
|
13681
|
-
if (typeof cursor !== "undefined") {
|
|
13682
|
-
payload["cursor"] = cursor;
|
|
13683
|
-
}
|
|
13684
|
-
if (typeof limit !== "undefined") {
|
|
13685
|
-
payload["limit"] = limit;
|
|
13686
|
-
}
|
|
13687
|
-
if (typeof retrieval !== "undefined") {
|
|
13688
|
-
payload["retrieval"] = retrieval;
|
|
13689
|
-
}
|
|
13690
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13691
|
-
const apiHeaders = {
|
|
13692
|
-
"content-type": "application/json"
|
|
13693
|
-
};
|
|
13694
|
-
return this.client.call(
|
|
13695
|
-
"post",
|
|
13696
|
-
uri,
|
|
13697
|
-
apiHeaders,
|
|
13698
|
-
payload
|
|
13699
|
-
);
|
|
13700
|
-
}
|
|
13701
|
-
getSkill(paramsOrFirst, ...rest) {
|
|
13702
|
-
let params;
|
|
13703
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13704
|
-
params = paramsOrFirst || {};
|
|
13705
|
-
} else {
|
|
13706
|
-
params = {
|
|
13707
|
-
knowledgeId: paramsOrFirst,
|
|
13708
|
-
scope: rest[0],
|
|
13709
|
-
userId: rest[1],
|
|
13710
|
-
agentId: rest[2],
|
|
13711
|
-
sessionId: rest[3],
|
|
13712
|
-
runId: rest[4],
|
|
13713
|
-
memorySubStoreId: rest[5]
|
|
13714
|
-
};
|
|
13715
|
-
}
|
|
13716
|
-
const knowledgeId = params.knowledgeId;
|
|
13717
|
-
const scope = params.scope;
|
|
13718
|
-
const userId = params.userId;
|
|
13719
|
-
const agentId = params.agentId;
|
|
13720
|
-
const sessionId = params.sessionId;
|
|
13721
|
-
const runId = params.runId;
|
|
13722
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13723
|
-
if (typeof knowledgeId === "undefined") {
|
|
13724
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13725
|
-
}
|
|
13726
|
-
const apiPath = "/memory/memories/skills/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
13727
|
-
const payload = {};
|
|
13728
|
-
if (typeof scope !== "undefined") {
|
|
13729
|
-
payload["scope"] = scope;
|
|
13730
|
-
}
|
|
13731
|
-
if (typeof userId !== "undefined") {
|
|
13732
|
-
payload["userId"] = userId;
|
|
13733
|
-
}
|
|
13734
|
-
if (typeof agentId !== "undefined") {
|
|
13735
|
-
payload["agentId"] = agentId;
|
|
13736
|
-
}
|
|
13737
|
-
if (typeof sessionId !== "undefined") {
|
|
13738
|
-
payload["sessionId"] = sessionId;
|
|
13739
|
-
}
|
|
13740
|
-
if (typeof runId !== "undefined") {
|
|
13741
|
-
payload["runId"] = runId;
|
|
13742
|
-
}
|
|
13743
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13744
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13745
|
-
}
|
|
13746
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13747
|
-
const apiHeaders = {};
|
|
13748
|
-
return this.client.call(
|
|
13749
|
-
"get",
|
|
13750
|
-
uri,
|
|
13751
|
-
apiHeaders,
|
|
13752
|
-
payload
|
|
13753
|
-
);
|
|
13754
|
-
}
|
|
13755
|
-
listSkillSources(paramsOrFirst, ...rest) {
|
|
13756
|
-
let params;
|
|
13757
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13758
|
-
params = paramsOrFirst || {};
|
|
13759
|
-
} else {
|
|
13760
|
-
params = {
|
|
13761
|
-
knowledgeId: paramsOrFirst,
|
|
13762
|
-
scope: rest[0],
|
|
13763
|
-
userId: rest[1],
|
|
13764
|
-
agentId: rest[2],
|
|
13765
|
-
sessionId: rest[3],
|
|
13766
|
-
runId: rest[4],
|
|
13767
|
-
memorySubStoreId: rest[5],
|
|
13768
|
-
cursor: rest[6],
|
|
13769
|
-
limit: rest[7]
|
|
13770
|
-
};
|
|
13771
|
-
}
|
|
13772
|
-
const knowledgeId = params.knowledgeId;
|
|
13773
|
-
const scope = params.scope;
|
|
13774
|
-
const userId = params.userId;
|
|
13775
|
-
const agentId = params.agentId;
|
|
13776
|
-
const sessionId = params.sessionId;
|
|
13777
|
-
const runId = params.runId;
|
|
13778
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13779
|
-
const cursor = params.cursor;
|
|
13780
|
-
const limit = params.limit;
|
|
13781
|
-
if (typeof knowledgeId === "undefined") {
|
|
13782
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13783
|
-
}
|
|
13784
|
-
const apiPath = "/memory/memories/skills/{knowledgeId}/sources".replace("{knowledgeId}", knowledgeId);
|
|
13785
|
-
const payload = {};
|
|
13786
|
-
if (typeof scope !== "undefined") {
|
|
13787
|
-
payload["scope"] = scope;
|
|
13788
|
-
}
|
|
13789
|
-
if (typeof userId !== "undefined") {
|
|
13790
|
-
payload["userId"] = userId;
|
|
13791
|
-
}
|
|
13792
|
-
if (typeof agentId !== "undefined") {
|
|
13793
|
-
payload["agentId"] = agentId;
|
|
13794
|
-
}
|
|
13795
|
-
if (typeof sessionId !== "undefined") {
|
|
13796
|
-
payload["sessionId"] = sessionId;
|
|
13797
|
-
}
|
|
13798
|
-
if (typeof runId !== "undefined") {
|
|
13799
|
-
payload["runId"] = runId;
|
|
13800
|
-
}
|
|
13801
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13802
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13803
|
-
}
|
|
13804
|
-
if (typeof cursor !== "undefined") {
|
|
13805
|
-
payload["cursor"] = cursor;
|
|
13806
|
-
}
|
|
13807
|
-
if (typeof limit !== "undefined") {
|
|
13808
|
-
payload["limit"] = limit;
|
|
13809
|
-
}
|
|
13810
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13811
|
-
const apiHeaders = {};
|
|
13812
|
-
return this.client.call(
|
|
13813
|
-
"get",
|
|
13814
|
-
uri,
|
|
13815
|
-
apiHeaders,
|
|
13816
|
-
payload
|
|
13817
|
-
);
|
|
13818
|
-
}
|
|
13819
|
-
/**
|
|
13820
|
-
* Get memory statistics visible to the current caller.
|
|
13821
|
-
*
|
|
13822
|
-
* @throws {AppBaseException}
|
|
13823
|
-
* @returns {Promise<{}>}
|
|
13824
|
-
*/
|
|
13825
|
-
getStats() {
|
|
13826
|
-
const apiPath = "/memory/memories/stats";
|
|
13827
|
-
const payload = {};
|
|
13828
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13829
|
-
const apiHeaders = {};
|
|
13830
|
-
return this.client.call(
|
|
13831
|
-
"get",
|
|
13832
|
-
uri,
|
|
13833
|
-
apiHeaders,
|
|
13834
|
-
payload
|
|
13835
|
-
);
|
|
13836
|
-
}
|
|
13837
|
-
/**
|
|
13838
|
-
* Get a memory activity timeline.
|
|
13839
|
-
*
|
|
13840
|
-
* @throws {AppBaseException}
|
|
13841
|
-
* @returns {Promise<{}>}
|
|
13842
|
-
*/
|
|
13843
|
-
getTimeline() {
|
|
13844
|
-
const apiPath = "/memory/memories/timeline";
|
|
13845
|
-
const payload = {};
|
|
13846
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13847
|
-
const apiHeaders = {};
|
|
13848
|
-
return this.client.call(
|
|
13849
|
-
"get",
|
|
13850
|
-
uri,
|
|
13851
|
-
apiHeaders,
|
|
13852
|
-
payload
|
|
13853
|
-
);
|
|
13854
|
-
}
|
|
13855
|
-
getProfile(paramsOrFirst, ...rest) {
|
|
13856
|
-
let params;
|
|
13857
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13858
|
-
params = paramsOrFirst || {};
|
|
13859
|
-
} else {
|
|
13860
|
-
params = {
|
|
13861
|
-
userId: paramsOrFirst,
|
|
13862
|
-
profileType: rest[0]
|
|
13863
|
-
};
|
|
13864
|
-
}
|
|
13865
|
-
const userId = params.userId;
|
|
13866
|
-
const profileType = params.profileType;
|
|
13867
|
-
if (typeof userId === "undefined") {
|
|
13868
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13869
|
-
}
|
|
13870
|
-
const apiPath = "/memory/memories/users/{userId}/profile".replace("{userId}", userId);
|
|
13871
|
-
const payload = {};
|
|
13872
|
-
if (typeof profileType !== "undefined") {
|
|
13873
|
-
payload["profileType"] = profileType;
|
|
13874
|
-
}
|
|
13875
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13876
|
-
const apiHeaders = {};
|
|
13877
|
-
return this.client.call(
|
|
13878
|
-
"get",
|
|
13879
|
-
uri,
|
|
13880
|
-
apiHeaders,
|
|
13881
|
-
payload
|
|
13882
|
-
);
|
|
13883
|
-
}
|
|
13884
|
-
deleteProfile(paramsOrFirst, ...rest) {
|
|
13885
|
-
let params;
|
|
13886
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13887
|
-
params = paramsOrFirst || {};
|
|
13888
|
-
} else {
|
|
13889
|
-
params = {
|
|
13890
|
-
userId: paramsOrFirst,
|
|
13891
|
-
profileType: rest[0],
|
|
13892
|
-
reason: rest[1],
|
|
13893
|
-
source: rest[2]
|
|
13894
|
-
};
|
|
13895
|
-
}
|
|
13896
|
-
const userId = params.userId;
|
|
13897
|
-
const profileType = params.profileType;
|
|
13898
|
-
const reason = params.reason;
|
|
13899
|
-
const source = params.source;
|
|
13900
|
-
if (typeof userId === "undefined") {
|
|
13901
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13902
|
-
}
|
|
13903
|
-
const apiPath = "/memory/memories/users/{userId}/profile".replace("{userId}", userId);
|
|
13904
|
-
const payload = {};
|
|
13905
|
-
if (typeof profileType !== "undefined") {
|
|
13906
|
-
payload["profileType"] = profileType;
|
|
13907
|
-
}
|
|
13908
|
-
if (typeof reason !== "undefined") {
|
|
13909
|
-
payload["reason"] = reason;
|
|
13910
|
-
}
|
|
13911
|
-
if (typeof source !== "undefined") {
|
|
13912
|
-
payload["source"] = source;
|
|
13913
|
-
}
|
|
13914
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13915
|
-
const apiHeaders = {
|
|
13916
|
-
"content-type": "application/json"
|
|
13917
|
-
};
|
|
13918
|
-
return this.client.call(
|
|
13919
|
-
"delete",
|
|
13920
|
-
uri,
|
|
13921
|
-
apiHeaders,
|
|
13922
|
-
payload
|
|
13923
|
-
);
|
|
13924
|
-
}
|
|
13925
|
-
createProfileExtraction(paramsOrFirst, ...rest) {
|
|
13926
|
-
let params;
|
|
13927
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13928
|
-
params = paramsOrFirst || {};
|
|
13929
|
-
} else {
|
|
13930
|
-
params = {
|
|
13931
|
-
userId: paramsOrFirst,
|
|
13932
|
-
profileType: rest[0],
|
|
13933
|
-
messages: rest[1],
|
|
13934
|
-
sourceMemoryIds: rest[2],
|
|
13935
|
-
mode: rest[3]
|
|
13936
|
-
};
|
|
13937
|
-
}
|
|
13938
|
-
const userId = params.userId;
|
|
13939
|
-
const profileType = params.profileType;
|
|
13940
|
-
const messages = params.messages;
|
|
13941
|
-
const sourceMemoryIds = params.sourceMemoryIds;
|
|
13942
|
-
const mode = params.mode;
|
|
13943
|
-
if (typeof userId === "undefined") {
|
|
13944
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13945
|
-
}
|
|
13946
|
-
const apiPath = "/memory/memories/users/{userId}/profile/extractions".replace("{userId}", userId);
|
|
13947
|
-
const payload = {};
|
|
13948
|
-
if (typeof profileType !== "undefined") {
|
|
13949
|
-
payload["profileType"] = profileType;
|
|
13950
|
-
}
|
|
13951
|
-
if (typeof messages !== "undefined") {
|
|
13952
|
-
payload["messages"] = messages;
|
|
13953
|
-
}
|
|
13954
|
-
if (typeof sourceMemoryIds !== "undefined") {
|
|
13955
|
-
payload["sourceMemoryIds"] = sourceMemoryIds;
|
|
13956
|
-
}
|
|
13957
|
-
if (typeof mode !== "undefined") {
|
|
13958
|
-
payload["mode"] = mode;
|
|
13959
|
-
}
|
|
13960
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13961
|
-
const apiHeaders = {
|
|
13962
|
-
"content-type": "application/json"
|
|
13963
|
-
};
|
|
13964
|
-
return this.client.call(
|
|
13965
|
-
"post",
|
|
13966
|
-
uri,
|
|
13967
|
-
apiHeaders,
|
|
13968
|
-
payload
|
|
13969
|
-
);
|
|
13970
|
-
}
|
|
13971
|
-
createProfileRebuild(paramsOrFirst, ...rest) {
|
|
13972
|
-
let params;
|
|
13973
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13974
|
-
params = paramsOrFirst || {};
|
|
13975
|
-
} else {
|
|
13976
|
-
params = {
|
|
13977
|
-
userId: paramsOrFirst,
|
|
13978
|
-
profileType: rest[0]
|
|
13979
|
-
};
|
|
13980
|
-
}
|
|
13981
|
-
const userId = params.userId;
|
|
13982
|
-
const profileType = params.profileType;
|
|
13983
|
-
if (typeof userId === "undefined") {
|
|
13984
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13985
|
-
}
|
|
13986
|
-
const apiPath = "/memory/memories/users/{userId}/profile/rebuild".replace("{userId}", userId);
|
|
13987
|
-
const payload = {};
|
|
13988
|
-
if (typeof profileType !== "undefined") {
|
|
13989
|
-
payload["profileType"] = profileType;
|
|
13990
|
-
}
|
|
13991
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13992
|
-
const apiHeaders = {
|
|
13993
|
-
"content-type": "application/json"
|
|
13994
|
-
};
|
|
13995
|
-
return this.client.call(
|
|
13996
|
-
"post",
|
|
13997
|
-
uri,
|
|
13998
|
-
apiHeaders,
|
|
13999
|
-
payload
|
|
14000
|
-
);
|
|
14001
|
-
}
|
|
14002
|
-
listProfileSources(paramsOrFirst, ...rest) {
|
|
14003
|
-
let params;
|
|
14004
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14005
|
-
params = paramsOrFirst || {};
|
|
14006
|
-
} else {
|
|
14007
|
-
params = {
|
|
14008
|
-
userId: paramsOrFirst,
|
|
14009
|
-
profileType: rest[0]
|
|
14010
|
-
};
|
|
14011
|
-
}
|
|
14012
|
-
const userId = params.userId;
|
|
14013
|
-
const profileType = params.profileType;
|
|
14014
|
-
if (typeof userId === "undefined") {
|
|
14015
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
14016
|
-
}
|
|
14017
|
-
const apiPath = "/memory/memories/users/{userId}/profile/sources".replace("{userId}", userId);
|
|
14018
|
-
const payload = {};
|
|
14019
|
-
if (typeof profileType !== "undefined") {
|
|
14020
|
-
payload["profileType"] = profileType;
|
|
14021
|
-
}
|
|
14022
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14023
|
-
const apiHeaders = {};
|
|
14024
|
-
return this.client.call(
|
|
14025
|
-
"get",
|
|
14026
|
-
uri,
|
|
14027
|
-
apiHeaders,
|
|
14028
|
-
payload
|
|
14029
|
-
);
|
|
14030
|
-
}
|
|
14031
|
-
get(paramsOrFirst) {
|
|
14032
|
-
let params;
|
|
14033
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14034
|
-
params = paramsOrFirst || {};
|
|
14035
|
-
} else {
|
|
14036
|
-
params = {
|
|
14037
|
-
memoryId: paramsOrFirst
|
|
14038
|
-
};
|
|
14039
|
-
}
|
|
14040
|
-
const memoryId = params.memoryId;
|
|
14041
|
-
if (typeof memoryId === "undefined") {
|
|
14042
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14043
|
-
}
|
|
14044
|
-
const apiPath = "/memory/memories/{memoryId}".replace("{memoryId}", memoryId);
|
|
14045
|
-
const payload = {};
|
|
14046
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14047
|
-
const apiHeaders = {};
|
|
14048
|
-
return this.client.call(
|
|
14049
|
-
"get",
|
|
14050
|
-
uri,
|
|
14051
|
-
apiHeaders,
|
|
14052
|
-
payload
|
|
14053
|
-
);
|
|
14054
|
-
}
|
|
14055
|
-
update(paramsOrFirst, ...rest) {
|
|
14056
|
-
let params;
|
|
14057
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14058
|
-
params = paramsOrFirst || {};
|
|
14059
|
-
} else {
|
|
14060
|
-
params = {
|
|
14061
|
-
memoryId: paramsOrFirst,
|
|
14062
|
-
version: rest[0],
|
|
14063
|
-
content: rest[1],
|
|
14064
|
-
metadata: rest[2],
|
|
14065
|
-
retentionPolicy: rest[3]
|
|
14066
|
-
};
|
|
14067
|
-
}
|
|
14068
|
-
const memoryId = params.memoryId;
|
|
14069
|
-
const version = params.version;
|
|
14070
|
-
const content = params.content;
|
|
14071
|
-
const metadata = params.metadata;
|
|
14072
|
-
const retentionPolicy = params.retentionPolicy;
|
|
14073
|
-
if (typeof memoryId === "undefined") {
|
|
14074
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14075
|
-
}
|
|
14076
|
-
if (typeof version === "undefined") {
|
|
14077
|
-
throw new AppBaseException('Missing required parameter: "version"');
|
|
14078
|
-
}
|
|
14079
|
-
const apiPath = "/memory/memories/{memoryId}".replace("{memoryId}", memoryId);
|
|
14080
|
-
const payload = {};
|
|
14081
|
-
if (typeof version !== "undefined") {
|
|
14082
|
-
payload["version"] = version;
|
|
14083
|
-
}
|
|
14084
|
-
if (typeof content !== "undefined") {
|
|
14085
|
-
payload["content"] = content;
|
|
14086
|
-
}
|
|
14087
|
-
if (typeof metadata !== "undefined") {
|
|
14088
|
-
payload["metadata"] = metadata;
|
|
14089
|
-
}
|
|
14090
|
-
if (typeof retentionPolicy !== "undefined") {
|
|
14091
|
-
payload["retentionPolicy"] = retentionPolicy;
|
|
14092
|
-
}
|
|
14093
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14094
|
-
const apiHeaders = {
|
|
14095
|
-
"content-type": "application/json"
|
|
14096
|
-
};
|
|
14097
|
-
return this.client.call(
|
|
14098
|
-
"patch",
|
|
14099
|
-
uri,
|
|
14100
|
-
apiHeaders,
|
|
14101
|
-
payload
|
|
14102
|
-
);
|
|
14103
|
-
}
|
|
14104
|
-
delete(paramsOrFirst, ...rest) {
|
|
14105
|
-
let params;
|
|
14106
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14107
|
-
params = paramsOrFirst || {};
|
|
14108
|
-
} else {
|
|
14109
|
-
params = {
|
|
14110
|
-
memoryId: paramsOrFirst,
|
|
14111
|
-
reason: rest[0],
|
|
14112
|
-
source: rest[1]
|
|
14113
|
-
};
|
|
14114
|
-
}
|
|
14115
|
-
const memoryId = params.memoryId;
|
|
14116
|
-
const reason = params.reason;
|
|
14117
|
-
const source = params.source;
|
|
14118
|
-
if (typeof memoryId === "undefined") {
|
|
14119
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14120
|
-
}
|
|
14121
|
-
const apiPath = "/memory/memories/{memoryId}".replace("{memoryId}", memoryId);
|
|
14122
|
-
const payload = {};
|
|
14123
|
-
if (typeof reason !== "undefined") {
|
|
14124
|
-
payload["reason"] = reason;
|
|
14125
|
-
}
|
|
14126
|
-
if (typeof source !== "undefined") {
|
|
14127
|
-
payload["source"] = source;
|
|
14128
|
-
}
|
|
14129
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14130
|
-
const apiHeaders = {
|
|
14131
|
-
"content-type": "application/json"
|
|
14132
|
-
};
|
|
14133
|
-
return this.client.call(
|
|
14134
|
-
"delete",
|
|
14135
|
-
uri,
|
|
14136
|
-
apiHeaders,
|
|
14137
|
-
payload
|
|
14138
|
-
);
|
|
14139
|
-
}
|
|
14140
|
-
listShares(paramsOrFirst) {
|
|
14141
|
-
let params;
|
|
14142
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14143
|
-
params = paramsOrFirst || {};
|
|
14144
|
-
} else {
|
|
14145
|
-
params = {
|
|
14146
|
-
memoryId: paramsOrFirst
|
|
14147
|
-
};
|
|
14148
|
-
}
|
|
14149
|
-
const memoryId = params.memoryId;
|
|
14150
|
-
if (typeof memoryId === "undefined") {
|
|
14151
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14152
|
-
}
|
|
14153
|
-
const apiPath = "/memory/memories/{memoryId}/shares".replace("{memoryId}", memoryId);
|
|
14154
|
-
const payload = {};
|
|
14155
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14156
|
-
const apiHeaders = {};
|
|
14157
|
-
return this.client.call(
|
|
14158
|
-
"get",
|
|
14159
|
-
uri,
|
|
14160
|
-
apiHeaders,
|
|
14161
|
-
payload
|
|
14162
|
-
);
|
|
14163
|
-
}
|
|
14164
|
-
createShare(paramsOrFirst, ...rest) {
|
|
14165
|
-
let params;
|
|
14166
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14167
|
-
params = paramsOrFirst || {};
|
|
14168
|
-
} else {
|
|
14169
|
-
params = {
|
|
14170
|
-
memoryId: paramsOrFirst,
|
|
14171
|
-
subjectType: rest[0],
|
|
14172
|
-
subjectId: rest[1],
|
|
14173
|
-
expiresAt: rest[2]
|
|
14174
|
-
};
|
|
14175
|
-
}
|
|
14176
|
-
const memoryId = params.memoryId;
|
|
14177
|
-
const subjectType = params.subjectType;
|
|
14178
|
-
const subjectId = params.subjectId;
|
|
14179
|
-
const expiresAt = params.expiresAt;
|
|
14180
|
-
if (typeof memoryId === "undefined") {
|
|
14181
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14182
|
-
}
|
|
14183
|
-
if (typeof subjectType === "undefined") {
|
|
14184
|
-
throw new AppBaseException('Missing required parameter: "subjectType"');
|
|
14185
|
-
}
|
|
14186
|
-
if (typeof subjectId === "undefined") {
|
|
14187
|
-
throw new AppBaseException('Missing required parameter: "subjectId"');
|
|
14188
|
-
}
|
|
14189
|
-
const apiPath = "/memory/memories/{memoryId}/shares".replace("{memoryId}", memoryId);
|
|
14190
|
-
const payload = {};
|
|
14191
|
-
if (typeof subjectType !== "undefined") {
|
|
14192
|
-
payload["subjectType"] = subjectType;
|
|
14193
|
-
}
|
|
14194
|
-
if (typeof subjectId !== "undefined") {
|
|
14195
|
-
payload["subjectId"] = subjectId;
|
|
14196
|
-
}
|
|
14197
|
-
if (typeof expiresAt !== "undefined") {
|
|
14198
|
-
payload["expiresAt"] = expiresAt;
|
|
14199
|
-
}
|
|
14200
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14201
|
-
const apiHeaders = {
|
|
14202
|
-
"content-type": "application/json"
|
|
14203
|
-
};
|
|
14204
|
-
return this.client.call(
|
|
14205
|
-
"post",
|
|
14206
|
-
uri,
|
|
14207
|
-
apiHeaders,
|
|
14208
|
-
payload
|
|
14209
|
-
);
|
|
14210
|
-
}
|
|
14211
|
-
deleteShare(paramsOrFirst, ...rest) {
|
|
14212
|
-
let params;
|
|
14213
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14214
|
-
params = paramsOrFirst || {};
|
|
14215
|
-
} else {
|
|
14216
|
-
params = {
|
|
14217
|
-
memoryId: paramsOrFirst,
|
|
14218
|
-
shareId: rest[0]
|
|
14219
|
-
};
|
|
14220
|
-
}
|
|
14221
|
-
const memoryId = params.memoryId;
|
|
14222
|
-
const shareId = params.shareId;
|
|
14223
|
-
if (typeof memoryId === "undefined") {
|
|
14224
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14225
|
-
}
|
|
14226
|
-
if (typeof shareId === "undefined") {
|
|
14227
|
-
throw new AppBaseException('Missing required parameter: "shareId"');
|
|
14228
|
-
}
|
|
14229
|
-
const apiPath = "/memory/memories/{memoryId}/shares/{shareId}".replace("{memoryId}", memoryId).replace("{shareId}", shareId);
|
|
14230
|
-
const payload = {};
|
|
14231
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14232
|
-
const apiHeaders = {
|
|
14233
|
-
"content-type": "application/json"
|
|
14234
|
-
};
|
|
14235
|
-
return this.client.call(
|
|
14236
|
-
"delete",
|
|
14237
|
-
uri,
|
|
14238
|
-
apiHeaders,
|
|
14239
|
-
payload
|
|
14240
|
-
);
|
|
14241
|
-
}
|
|
14242
|
-
listSources(paramsOrFirst, ...rest) {
|
|
14243
|
-
let params;
|
|
14244
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14245
|
-
params = paramsOrFirst || {};
|
|
14246
|
-
} else {
|
|
14247
|
-
params = {
|
|
14248
|
-
memoryId: paramsOrFirst,
|
|
14249
|
-
cursor: rest[0],
|
|
14250
|
-
limit: rest[1]
|
|
14251
|
-
};
|
|
14252
|
-
}
|
|
14253
|
-
const memoryId = params.memoryId;
|
|
14254
|
-
const cursor = params.cursor;
|
|
14255
|
-
const limit = params.limit;
|
|
14256
|
-
if (typeof memoryId === "undefined") {
|
|
14257
|
-
throw new AppBaseException('Missing required parameter: "memoryId"');
|
|
14258
|
-
}
|
|
14259
|
-
const apiPath = "/memory/memories/{memoryId}/sources".replace("{memoryId}", memoryId);
|
|
14260
|
-
const payload = {};
|
|
14261
|
-
if (typeof cursor !== "undefined") {
|
|
14262
|
-
payload["cursor"] = cursor;
|
|
14263
|
-
}
|
|
14264
|
-
if (typeof limit !== "undefined") {
|
|
14265
|
-
payload["limit"] = limit;
|
|
14266
|
-
}
|
|
14267
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14268
|
-
const apiHeaders = {};
|
|
14269
|
-
return this.client.call(
|
|
14270
|
-
"get",
|
|
14271
|
-
uri,
|
|
14272
|
-
apiHeaders,
|
|
14273
|
-
payload
|
|
14274
|
-
);
|
|
14275
|
-
}
|
|
14276
|
-
};
|
|
14277
|
-
|
|
14278
11455
|
// ../../node_modules/@alipay/appbase-node-sdk/dist/services/tables-db.mjs
|
|
14279
11456
|
var TablesDB = class {
|
|
14280
11457
|
constructor(client) {
|
|
@@ -18096,24 +15273,6 @@ _Operator.dateAddDays = (days) => new _Operator("dateAddDays", [days]).toString(
|
|
|
18096
15273
|
_Operator.dateSubDays = (days) => new _Operator("dateSubDays", [days]).toString();
|
|
18097
15274
|
_Operator.dateSetNow = () => new _Operator("dateSetNow", []).toString();
|
|
18098
15275
|
|
|
18099
|
-
// ../../node_modules/@alipay/appbase-node-sdk/dist/enums/memory-scope.mjs
|
|
18100
|
-
var MemoryScope = /* @__PURE__ */ ((MemoryScope2) => {
|
|
18101
|
-
MemoryScope2["Private"] = "private";
|
|
18102
|
-
MemoryScope2["StrictPrivate"] = "strict_private";
|
|
18103
|
-
MemoryScope2["User"] = "user";
|
|
18104
|
-
MemoryScope2["Group"] = "group";
|
|
18105
|
-
MemoryScope2["Project"] = "project";
|
|
18106
|
-
return MemoryScope2;
|
|
18107
|
-
})(MemoryScope || {});
|
|
18108
|
-
|
|
18109
|
-
// ../../node_modules/@alipay/appbase-node-sdk/dist/enums/memory-record-kind.mjs
|
|
18110
|
-
var MemoryRecordKind = /* @__PURE__ */ ((MemoryRecordKind2) => {
|
|
18111
|
-
MemoryRecordKind2["Conversation"] = "conversation";
|
|
18112
|
-
MemoryRecordKind2["Fact"] = "fact";
|
|
18113
|
-
MemoryRecordKind2["Action"] = "action";
|
|
18114
|
-
return MemoryRecordKind2;
|
|
18115
|
-
})(MemoryRecordKind || {});
|
|
18116
|
-
|
|
18117
15276
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/runStorage.js
|
|
18118
15277
|
var ENDPOINT_SOURCES = [
|
|
18119
15278
|
"APPWRITE_FUNCTION_API_ENDPOINT",
|
|
@@ -18832,10 +15991,7 @@ export {
|
|
|
18832
15991
|
APPBASE_RUNTIME_CONFIG_DEFAULTS,
|
|
18833
15992
|
AppbaseRuntimeConfigProvider,
|
|
18834
15993
|
Query,
|
|
18835
|
-
Memory,
|
|
18836
15994
|
TablesDB,
|
|
18837
|
-
MemoryScope,
|
|
18838
|
-
MemoryRecordKind,
|
|
18839
15995
|
withIsoTimestamp,
|
|
18840
15996
|
isDebugLogLevel,
|
|
18841
15997
|
describeRuntimeEnv,
|