agentbase-web-sdk 2.9.0 → 2.10.0
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/README.md +2 -2
- package/dist/cjs/sdk.js +812 -69
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +813 -70
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +812 -69
- package/package.json +2 -2
- package/types/enums/method.d.ts +9 -0
- package/types/enums/path-match.d.ts +4 -0
- package/types/enums/scenario.d.ts +6 -0
- package/types/enums/status.d.ts +5 -1
- package/types/index.d.ts +4 -1
- package/types/services/functions.d.ts +33 -7
- package/types/services/memory.d.ts +488 -16
package/dist/cjs/sdk.js
CHANGED
|
@@ -614,9 +614,9 @@ class Client {
|
|
|
614
614
|
'x-sdk-name': 'Agentbase',
|
|
615
615
|
'x-sdk-platform': 'client',
|
|
616
616
|
'x-sdk-language': 'web',
|
|
617
|
-
'x-sdk-version': '2.
|
|
617
|
+
'x-sdk-version': '2.10.0',
|
|
618
618
|
'X-AppBase-SDK': 'true',
|
|
619
|
-
'X-Appwrite-Response-Format': '2.
|
|
619
|
+
'X-Appwrite-Response-Format': '2.10.0',
|
|
620
620
|
};
|
|
621
621
|
this.realtime = {
|
|
622
622
|
socket: undefined,
|
|
@@ -6317,13 +6317,19 @@ class Functions {
|
|
|
6317
6317
|
functionId: paramsOrFirst,
|
|
6318
6318
|
limit: rest[0],
|
|
6319
6319
|
offset: rest[1],
|
|
6320
|
-
total: rest[2]
|
|
6320
|
+
total: rest[2],
|
|
6321
|
+
xpath: rest[3],
|
|
6322
|
+
pathMatch: rest[4],
|
|
6323
|
+
method: rest[5]
|
|
6321
6324
|
};
|
|
6322
6325
|
}
|
|
6323
6326
|
const functionId = params.functionId;
|
|
6324
6327
|
const limit = params.limit;
|
|
6325
6328
|
const offset = params.offset;
|
|
6326
6329
|
const total = params.total;
|
|
6330
|
+
const xpath = params.xpath;
|
|
6331
|
+
const pathMatch = params.pathMatch;
|
|
6332
|
+
const method = params.method;
|
|
6327
6333
|
if (typeof functionId === 'undefined') {
|
|
6328
6334
|
throw new AgentbaseException('Missing required parameter: "functionId"');
|
|
6329
6335
|
}
|
|
@@ -6338,6 +6344,15 @@ class Functions {
|
|
|
6338
6344
|
if (typeof total !== 'undefined') {
|
|
6339
6345
|
payload['total'] = total;
|
|
6340
6346
|
}
|
|
6347
|
+
if (typeof xpath !== 'undefined') {
|
|
6348
|
+
payload['path'] = xpath;
|
|
6349
|
+
}
|
|
6350
|
+
if (typeof pathMatch !== 'undefined') {
|
|
6351
|
+
payload['pathMatch'] = pathMatch;
|
|
6352
|
+
}
|
|
6353
|
+
if (typeof method !== 'undefined') {
|
|
6354
|
+
payload['method'] = method;
|
|
6355
|
+
}
|
|
6341
6356
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6342
6357
|
const apiHeaders = {
|
|
6343
6358
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -6354,13 +6369,17 @@ class Functions {
|
|
|
6354
6369
|
functionId: paramsOrFirst,
|
|
6355
6370
|
xpath: rest[0],
|
|
6356
6371
|
queries: rest[1],
|
|
6357
|
-
total: rest[2]
|
|
6372
|
+
total: rest[2],
|
|
6373
|
+
pathMatch: rest[3],
|
|
6374
|
+
method: rest[4]
|
|
6358
6375
|
};
|
|
6359
6376
|
}
|
|
6360
6377
|
const functionId = params.functionId;
|
|
6361
6378
|
const xpath = params.xpath;
|
|
6362
6379
|
const queries = params.queries;
|
|
6363
6380
|
const total = params.total;
|
|
6381
|
+
const pathMatch = params.pathMatch;
|
|
6382
|
+
const method = params.method;
|
|
6364
6383
|
if (typeof functionId === 'undefined') {
|
|
6365
6384
|
throw new AgentbaseException('Missing required parameter: "functionId"');
|
|
6366
6385
|
}
|
|
@@ -6378,6 +6397,12 @@ class Functions {
|
|
|
6378
6397
|
if (typeof total !== 'undefined') {
|
|
6379
6398
|
payload['total'] = total;
|
|
6380
6399
|
}
|
|
6400
|
+
if (typeof pathMatch !== 'undefined') {
|
|
6401
|
+
payload['pathMatch'] = pathMatch;
|
|
6402
|
+
}
|
|
6403
|
+
if (typeof method !== 'undefined') {
|
|
6404
|
+
payload['method'] = method;
|
|
6405
|
+
}
|
|
6381
6406
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6382
6407
|
const apiHeaders = {
|
|
6383
6408
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -6393,12 +6418,18 @@ class Functions {
|
|
|
6393
6418
|
params = {
|
|
6394
6419
|
functionId: paramsOrFirst,
|
|
6395
6420
|
queries: rest[0],
|
|
6396
|
-
total: rest[1]
|
|
6421
|
+
total: rest[1],
|
|
6422
|
+
xpath: rest[2],
|
|
6423
|
+
pathMatch: rest[3],
|
|
6424
|
+
method: rest[4]
|
|
6397
6425
|
};
|
|
6398
6426
|
}
|
|
6399
6427
|
const functionId = params.functionId;
|
|
6400
6428
|
const queries = params.queries;
|
|
6401
6429
|
const total = params.total;
|
|
6430
|
+
const xpath = params.xpath;
|
|
6431
|
+
const pathMatch = params.pathMatch;
|
|
6432
|
+
const method = params.method;
|
|
6402
6433
|
if (typeof functionId === 'undefined') {
|
|
6403
6434
|
throw new AgentbaseException('Missing required parameter: "functionId"');
|
|
6404
6435
|
}
|
|
@@ -6410,6 +6441,15 @@ class Functions {
|
|
|
6410
6441
|
if (typeof total !== 'undefined') {
|
|
6411
6442
|
payload['total'] = total;
|
|
6412
6443
|
}
|
|
6444
|
+
if (typeof xpath !== 'undefined') {
|
|
6445
|
+
payload['path'] = xpath;
|
|
6446
|
+
}
|
|
6447
|
+
if (typeof pathMatch !== 'undefined') {
|
|
6448
|
+
payload['pathMatch'] = pathMatch;
|
|
6449
|
+
}
|
|
6450
|
+
if (typeof method !== 'undefined') {
|
|
6451
|
+
payload['method'] = method;
|
|
6452
|
+
}
|
|
6413
6453
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6414
6454
|
const apiHeaders = {
|
|
6415
6455
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -7275,25 +7315,29 @@ class Memory {
|
|
|
7275
7315
|
scope: rest[0],
|
|
7276
7316
|
memoryType: rest[1],
|
|
7277
7317
|
recordKind: rest[2],
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7318
|
+
pipelineId: rest[3],
|
|
7319
|
+
content: rest[4],
|
|
7320
|
+
messages: rest[5],
|
|
7321
|
+
media: rest[6],
|
|
7322
|
+
agentId: rest[7],
|
|
7323
|
+
runId: rest[8],
|
|
7324
|
+
sessionId: rest[9],
|
|
7325
|
+
sensitivity: rest[10],
|
|
7326
|
+
handlingPolicy: rest[11],
|
|
7327
|
+
metadata: rest[12],
|
|
7328
|
+
infer: rest[13],
|
|
7329
|
+
reRemember: rest[14],
|
|
7330
|
+
async: rest[15]
|
|
7289
7331
|
};
|
|
7290
7332
|
}
|
|
7291
7333
|
const userId = params.userId;
|
|
7292
7334
|
const scope = params.scope;
|
|
7293
7335
|
const memoryType = params.memoryType;
|
|
7294
7336
|
const recordKind = params.recordKind;
|
|
7337
|
+
const pipelineId = params.pipelineId;
|
|
7295
7338
|
const content = params.content;
|
|
7296
7339
|
const messages = params.messages;
|
|
7340
|
+
const media = params.media;
|
|
7297
7341
|
const agentId = params.agentId;
|
|
7298
7342
|
const runId = params.runId;
|
|
7299
7343
|
const sessionId = params.sessionId;
|
|
@@ -7317,12 +7361,18 @@ class Memory {
|
|
|
7317
7361
|
}
|
|
7318
7362
|
const apiPath = '/memory/memories';
|
|
7319
7363
|
const payload = {};
|
|
7364
|
+
if (typeof pipelineId !== 'undefined') {
|
|
7365
|
+
payload['pipelineId'] = pipelineId;
|
|
7366
|
+
}
|
|
7320
7367
|
if (typeof content !== 'undefined') {
|
|
7321
7368
|
payload['content'] = content;
|
|
7322
7369
|
}
|
|
7323
7370
|
if (typeof messages !== 'undefined') {
|
|
7324
7371
|
payload['messages'] = messages;
|
|
7325
7372
|
}
|
|
7373
|
+
if (typeof media !== 'undefined') {
|
|
7374
|
+
payload['media'] = media;
|
|
7375
|
+
}
|
|
7326
7376
|
if (typeof userId !== 'undefined') {
|
|
7327
7377
|
payload['userId'] = userId;
|
|
7328
7378
|
}
|
|
@@ -7377,12 +7427,14 @@ class Memory {
|
|
|
7377
7427
|
else {
|
|
7378
7428
|
params = {
|
|
7379
7429
|
userId: paramsOrFirst,
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7430
|
+
memorySubStoreId: rest[0],
|
|
7431
|
+
limit: rest[1],
|
|
7432
|
+
reason: rest[2],
|
|
7433
|
+
source: rest[3]
|
|
7383
7434
|
};
|
|
7384
7435
|
}
|
|
7385
7436
|
const userId = params.userId;
|
|
7437
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
7386
7438
|
const limit = params.limit;
|
|
7387
7439
|
const reason = params.reason;
|
|
7388
7440
|
const source = params.source;
|
|
@@ -7391,6 +7443,9 @@ class Memory {
|
|
|
7391
7443
|
if (typeof userId !== 'undefined') {
|
|
7392
7444
|
payload['userId'] = userId;
|
|
7393
7445
|
}
|
|
7446
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
7447
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
7448
|
+
}
|
|
7394
7449
|
if (typeof limit !== 'undefined') {
|
|
7395
7450
|
payload['limit'] = limit;
|
|
7396
7451
|
}
|
|
@@ -7918,7 +7973,7 @@ class Memory {
|
|
|
7918
7973
|
}
|
|
7919
7974
|
submitDistillation(paramsOrFirst, ...rest) {
|
|
7920
7975
|
let params;
|
|
7921
|
-
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))) {
|
|
7976
|
+
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 || 'pipelineId' in paramsOrFirst || 'sourceId' in paramsOrFirst || 'sourceType' in paramsOrFirst || 'messages' in paramsOrFirst || 'toolEvents' in paramsOrFirst || 'mode' in paramsOrFirst || 'idempotencyKey' in paramsOrFirst))) {
|
|
7922
7977
|
params = (paramsOrFirst || {});
|
|
7923
7978
|
}
|
|
7924
7979
|
else {
|
|
@@ -7929,12 +7984,13 @@ class Memory {
|
|
|
7929
7984
|
sessionId: rest[2],
|
|
7930
7985
|
runId: rest[3],
|
|
7931
7986
|
memorySubStoreId: rest[4],
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7987
|
+
pipelineId: rest[5],
|
|
7988
|
+
sourceId: rest[6],
|
|
7989
|
+
sourceType: rest[7],
|
|
7990
|
+
messages: rest[8],
|
|
7991
|
+
toolEvents: rest[9],
|
|
7992
|
+
mode: rest[10],
|
|
7993
|
+
idempotencyKey: rest[11]
|
|
7938
7994
|
};
|
|
7939
7995
|
}
|
|
7940
7996
|
const scope = params.scope;
|
|
@@ -7943,6 +7999,7 @@ class Memory {
|
|
|
7943
7999
|
const sessionId = params.sessionId;
|
|
7944
8000
|
const runId = params.runId;
|
|
7945
8001
|
const memorySubStoreId = params.memorySubStoreId;
|
|
8002
|
+
const pipelineId = params.pipelineId;
|
|
7946
8003
|
const sourceId = params.sourceId;
|
|
7947
8004
|
const sourceType = params.sourceType;
|
|
7948
8005
|
const messages = params.messages;
|
|
@@ -7969,6 +8026,9 @@ class Memory {
|
|
|
7969
8026
|
if (typeof memorySubStoreId !== 'undefined') {
|
|
7970
8027
|
payload['memorySubStoreId'] = memorySubStoreId;
|
|
7971
8028
|
}
|
|
8029
|
+
if (typeof pipelineId !== 'undefined') {
|
|
8030
|
+
payload['pipelineId'] = pipelineId;
|
|
8031
|
+
}
|
|
7972
8032
|
if (typeof sourceId !== 'undefined') {
|
|
7973
8033
|
payload['sourceId'] = sourceId;
|
|
7974
8034
|
}
|
|
@@ -8562,13 +8622,15 @@ class Memory {
|
|
|
8562
8622
|
else {
|
|
8563
8623
|
params = {
|
|
8564
8624
|
userId: paramsOrFirst,
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8625
|
+
pipelineId: rest[0],
|
|
8626
|
+
format: rest[1],
|
|
8627
|
+
data: rest[2],
|
|
8628
|
+
records: rest[3],
|
|
8629
|
+
dryRun: rest[4]
|
|
8569
8630
|
};
|
|
8570
8631
|
}
|
|
8571
8632
|
const userId = params.userId;
|
|
8633
|
+
const pipelineId = params.pipelineId;
|
|
8572
8634
|
const format = params.format;
|
|
8573
8635
|
const data = params.data;
|
|
8574
8636
|
const records = params.records;
|
|
@@ -8578,6 +8640,9 @@ class Memory {
|
|
|
8578
8640
|
}
|
|
8579
8641
|
const apiPath = '/memory/memories/imports';
|
|
8580
8642
|
const payload = {};
|
|
8643
|
+
if (typeof pipelineId !== 'undefined') {
|
|
8644
|
+
payload['pipelineId'] = pipelineId;
|
|
8645
|
+
}
|
|
8581
8646
|
if (typeof userId !== 'undefined') {
|
|
8582
8647
|
payload['userId'] = userId;
|
|
8583
8648
|
}
|
|
@@ -8622,6 +8687,125 @@ class Memory {
|
|
|
8622
8687
|
};
|
|
8623
8688
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
8624
8689
|
}
|
|
8690
|
+
listKnowledgeReviews(paramsOrFirst, ...rest) {
|
|
8691
|
+
let params;
|
|
8692
|
+
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 || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'status' in paramsOrFirst || 'knowledgeId' in paramsOrFirst))) {
|
|
8693
|
+
params = (paramsOrFirst || {});
|
|
8694
|
+
}
|
|
8695
|
+
else {
|
|
8696
|
+
params = {
|
|
8697
|
+
scope: paramsOrFirst,
|
|
8698
|
+
userId: rest[0],
|
|
8699
|
+
agentId: rest[1],
|
|
8700
|
+
sessionId: rest[2],
|
|
8701
|
+
runId: rest[3],
|
|
8702
|
+
memorySubStoreId: rest[4],
|
|
8703
|
+
limit: rest[5],
|
|
8704
|
+
offset: rest[6],
|
|
8705
|
+
status: rest[7],
|
|
8706
|
+
knowledgeId: rest[8]
|
|
8707
|
+
};
|
|
8708
|
+
}
|
|
8709
|
+
const scope = params.scope;
|
|
8710
|
+
const userId = params.userId;
|
|
8711
|
+
const agentId = params.agentId;
|
|
8712
|
+
const sessionId = params.sessionId;
|
|
8713
|
+
const runId = params.runId;
|
|
8714
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
8715
|
+
const limit = params.limit;
|
|
8716
|
+
const offset = params.offset;
|
|
8717
|
+
const status = params.status;
|
|
8718
|
+
const knowledgeId = params.knowledgeId;
|
|
8719
|
+
const apiPath = '/memory/memories/knowledge/reviews';
|
|
8720
|
+
const payload = {};
|
|
8721
|
+
if (typeof scope !== 'undefined') {
|
|
8722
|
+
payload['scope'] = scope;
|
|
8723
|
+
}
|
|
8724
|
+
if (typeof userId !== 'undefined') {
|
|
8725
|
+
payload['userId'] = userId;
|
|
8726
|
+
}
|
|
8727
|
+
if (typeof agentId !== 'undefined') {
|
|
8728
|
+
payload['agentId'] = agentId;
|
|
8729
|
+
}
|
|
8730
|
+
if (typeof sessionId !== 'undefined') {
|
|
8731
|
+
payload['sessionId'] = sessionId;
|
|
8732
|
+
}
|
|
8733
|
+
if (typeof runId !== 'undefined') {
|
|
8734
|
+
payload['runId'] = runId;
|
|
8735
|
+
}
|
|
8736
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
8737
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
8738
|
+
}
|
|
8739
|
+
if (typeof limit !== 'undefined') {
|
|
8740
|
+
payload['limit'] = limit;
|
|
8741
|
+
}
|
|
8742
|
+
if (typeof offset !== 'undefined') {
|
|
8743
|
+
payload['offset'] = offset;
|
|
8744
|
+
}
|
|
8745
|
+
if (typeof status !== 'undefined') {
|
|
8746
|
+
payload['status'] = status;
|
|
8747
|
+
}
|
|
8748
|
+
if (typeof knowledgeId !== 'undefined') {
|
|
8749
|
+
payload['knowledgeId'] = knowledgeId;
|
|
8750
|
+
}
|
|
8751
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8752
|
+
const apiHeaders = {
|
|
8753
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
8754
|
+
};
|
|
8755
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
8756
|
+
}
|
|
8757
|
+
getKnowledgeReview(paramsOrFirst, ...rest) {
|
|
8758
|
+
let params;
|
|
8759
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
8760
|
+
params = (paramsOrFirst || {});
|
|
8761
|
+
}
|
|
8762
|
+
else {
|
|
8763
|
+
params = {
|
|
8764
|
+
reviewId: paramsOrFirst,
|
|
8765
|
+
scope: rest[0],
|
|
8766
|
+
userId: rest[1],
|
|
8767
|
+
agentId: rest[2],
|
|
8768
|
+
sessionId: rest[3],
|
|
8769
|
+
runId: rest[4],
|
|
8770
|
+
memorySubStoreId: rest[5]
|
|
8771
|
+
};
|
|
8772
|
+
}
|
|
8773
|
+
const reviewId = params.reviewId;
|
|
8774
|
+
const scope = params.scope;
|
|
8775
|
+
const userId = params.userId;
|
|
8776
|
+
const agentId = params.agentId;
|
|
8777
|
+
const sessionId = params.sessionId;
|
|
8778
|
+
const runId = params.runId;
|
|
8779
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
8780
|
+
if (typeof reviewId === 'undefined') {
|
|
8781
|
+
throw new AgentbaseException('Missing required parameter: "reviewId"');
|
|
8782
|
+
}
|
|
8783
|
+
const apiPath = '/memory/memories/knowledge/reviews/{reviewId}'.replace('{reviewId}', reviewId);
|
|
8784
|
+
const payload = {};
|
|
8785
|
+
if (typeof scope !== 'undefined') {
|
|
8786
|
+
payload['scope'] = scope;
|
|
8787
|
+
}
|
|
8788
|
+
if (typeof userId !== 'undefined') {
|
|
8789
|
+
payload['userId'] = userId;
|
|
8790
|
+
}
|
|
8791
|
+
if (typeof agentId !== 'undefined') {
|
|
8792
|
+
payload['agentId'] = agentId;
|
|
8793
|
+
}
|
|
8794
|
+
if (typeof sessionId !== 'undefined') {
|
|
8795
|
+
payload['sessionId'] = sessionId;
|
|
8796
|
+
}
|
|
8797
|
+
if (typeof runId !== 'undefined') {
|
|
8798
|
+
payload['runId'] = runId;
|
|
8799
|
+
}
|
|
8800
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
8801
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
8802
|
+
}
|
|
8803
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8804
|
+
const apiHeaders = {
|
|
8805
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
8806
|
+
};
|
|
8807
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
8808
|
+
}
|
|
8625
8809
|
updateKnowledge(paramsOrFirst, ...rest) {
|
|
8626
8810
|
let params;
|
|
8627
8811
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -8725,10 +8909,193 @@ class Memory {
|
|
|
8725
8909
|
if (typeof knowledgeId === 'undefined') {
|
|
8726
8910
|
throw new AgentbaseException('Missing required parameter: "knowledgeId"');
|
|
8727
8911
|
}
|
|
8728
|
-
if (typeof expectedVersion === 'undefined') {
|
|
8729
|
-
throw new AgentbaseException('Missing required parameter: "expectedVersion"');
|
|
8730
|
-
}
|
|
8731
|
-
const apiPath = '/memory/memories/knowledge/{knowledgeId}'.replace('{knowledgeId}', knowledgeId);
|
|
8912
|
+
if (typeof expectedVersion === 'undefined') {
|
|
8913
|
+
throw new AgentbaseException('Missing required parameter: "expectedVersion"');
|
|
8914
|
+
}
|
|
8915
|
+
const apiPath = '/memory/memories/knowledge/{knowledgeId}'.replace('{knowledgeId}', knowledgeId);
|
|
8916
|
+
const payload = {};
|
|
8917
|
+
if (typeof scope !== 'undefined') {
|
|
8918
|
+
payload['scope'] = scope;
|
|
8919
|
+
}
|
|
8920
|
+
if (typeof userId !== 'undefined') {
|
|
8921
|
+
payload['userId'] = userId;
|
|
8922
|
+
}
|
|
8923
|
+
if (typeof agentId !== 'undefined') {
|
|
8924
|
+
payload['agentId'] = agentId;
|
|
8925
|
+
}
|
|
8926
|
+
if (typeof sessionId !== 'undefined') {
|
|
8927
|
+
payload['sessionId'] = sessionId;
|
|
8928
|
+
}
|
|
8929
|
+
if (typeof runId !== 'undefined') {
|
|
8930
|
+
payload['runId'] = runId;
|
|
8931
|
+
}
|
|
8932
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
8933
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
8934
|
+
}
|
|
8935
|
+
if (typeof expectedVersion !== 'undefined') {
|
|
8936
|
+
payload['expectedVersion'] = expectedVersion;
|
|
8937
|
+
}
|
|
8938
|
+
if (typeof reason !== 'undefined') {
|
|
8939
|
+
payload['reason'] = reason;
|
|
8940
|
+
}
|
|
8941
|
+
if (typeof source !== 'undefined') {
|
|
8942
|
+
payload['source'] = source;
|
|
8943
|
+
}
|
|
8944
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8945
|
+
const apiHeaders = {
|
|
8946
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
8947
|
+
'content-type': 'application/json',
|
|
8948
|
+
};
|
|
8949
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
8950
|
+
}
|
|
8951
|
+
getKnowledgeDiff(paramsOrFirst, ...rest) {
|
|
8952
|
+
let params;
|
|
8953
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
8954
|
+
params = (paramsOrFirst || {});
|
|
8955
|
+
}
|
|
8956
|
+
else {
|
|
8957
|
+
params = {
|
|
8958
|
+
knowledgeId: paramsOrFirst,
|
|
8959
|
+
toRevisionId: rest[0],
|
|
8960
|
+
scope: rest[1],
|
|
8961
|
+
userId: rest[2],
|
|
8962
|
+
agentId: rest[3],
|
|
8963
|
+
sessionId: rest[4],
|
|
8964
|
+
runId: rest[5],
|
|
8965
|
+
memorySubStoreId: rest[6],
|
|
8966
|
+
fromRevisionId: rest[7]
|
|
8967
|
+
};
|
|
8968
|
+
}
|
|
8969
|
+
const knowledgeId = params.knowledgeId;
|
|
8970
|
+
const toRevisionId = params.toRevisionId;
|
|
8971
|
+
const scope = params.scope;
|
|
8972
|
+
const userId = params.userId;
|
|
8973
|
+
const agentId = params.agentId;
|
|
8974
|
+
const sessionId = params.sessionId;
|
|
8975
|
+
const runId = params.runId;
|
|
8976
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
8977
|
+
const fromRevisionId = params.fromRevisionId;
|
|
8978
|
+
if (typeof knowledgeId === 'undefined') {
|
|
8979
|
+
throw new AgentbaseException('Missing required parameter: "knowledgeId"');
|
|
8980
|
+
}
|
|
8981
|
+
if (typeof toRevisionId === 'undefined') {
|
|
8982
|
+
throw new AgentbaseException('Missing required parameter: "toRevisionId"');
|
|
8983
|
+
}
|
|
8984
|
+
const apiPath = '/memory/memories/knowledge/{knowledgeId}/diff'.replace('{knowledgeId}', knowledgeId);
|
|
8985
|
+
const payload = {};
|
|
8986
|
+
if (typeof scope !== 'undefined') {
|
|
8987
|
+
payload['scope'] = scope;
|
|
8988
|
+
}
|
|
8989
|
+
if (typeof userId !== 'undefined') {
|
|
8990
|
+
payload['userId'] = userId;
|
|
8991
|
+
}
|
|
8992
|
+
if (typeof agentId !== 'undefined') {
|
|
8993
|
+
payload['agentId'] = agentId;
|
|
8994
|
+
}
|
|
8995
|
+
if (typeof sessionId !== 'undefined') {
|
|
8996
|
+
payload['sessionId'] = sessionId;
|
|
8997
|
+
}
|
|
8998
|
+
if (typeof runId !== 'undefined') {
|
|
8999
|
+
payload['runId'] = runId;
|
|
9000
|
+
}
|
|
9001
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
9002
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
9003
|
+
}
|
|
9004
|
+
if (typeof fromRevisionId !== 'undefined') {
|
|
9005
|
+
payload['fromRevisionId'] = fromRevisionId;
|
|
9006
|
+
}
|
|
9007
|
+
if (typeof toRevisionId !== 'undefined') {
|
|
9008
|
+
payload['toRevisionId'] = toRevisionId;
|
|
9009
|
+
}
|
|
9010
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9011
|
+
const apiHeaders = {
|
|
9012
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
9013
|
+
};
|
|
9014
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
9015
|
+
}
|
|
9016
|
+
listKnowledgeEvents(paramsOrFirst, ...rest) {
|
|
9017
|
+
let params;
|
|
9018
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9019
|
+
params = (paramsOrFirst || {});
|
|
9020
|
+
}
|
|
9021
|
+
else {
|
|
9022
|
+
params = {
|
|
9023
|
+
knowledgeId: paramsOrFirst,
|
|
9024
|
+
scope: rest[0],
|
|
9025
|
+
userId: rest[1],
|
|
9026
|
+
agentId: rest[2],
|
|
9027
|
+
sessionId: rest[3],
|
|
9028
|
+
runId: rest[4],
|
|
9029
|
+
memorySubStoreId: rest[5]
|
|
9030
|
+
};
|
|
9031
|
+
}
|
|
9032
|
+
const knowledgeId = params.knowledgeId;
|
|
9033
|
+
const scope = params.scope;
|
|
9034
|
+
const userId = params.userId;
|
|
9035
|
+
const agentId = params.agentId;
|
|
9036
|
+
const sessionId = params.sessionId;
|
|
9037
|
+
const runId = params.runId;
|
|
9038
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
9039
|
+
if (typeof knowledgeId === 'undefined') {
|
|
9040
|
+
throw new AgentbaseException('Missing required parameter: "knowledgeId"');
|
|
9041
|
+
}
|
|
9042
|
+
const apiPath = '/memory/memories/knowledge/{knowledgeId}/events'.replace('{knowledgeId}', knowledgeId);
|
|
9043
|
+
const payload = {};
|
|
9044
|
+
if (typeof scope !== 'undefined') {
|
|
9045
|
+
payload['scope'] = scope;
|
|
9046
|
+
}
|
|
9047
|
+
if (typeof userId !== 'undefined') {
|
|
9048
|
+
payload['userId'] = userId;
|
|
9049
|
+
}
|
|
9050
|
+
if (typeof agentId !== 'undefined') {
|
|
9051
|
+
payload['agentId'] = agentId;
|
|
9052
|
+
}
|
|
9053
|
+
if (typeof sessionId !== 'undefined') {
|
|
9054
|
+
payload['sessionId'] = sessionId;
|
|
9055
|
+
}
|
|
9056
|
+
if (typeof runId !== 'undefined') {
|
|
9057
|
+
payload['runId'] = runId;
|
|
9058
|
+
}
|
|
9059
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
9060
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
9061
|
+
}
|
|
9062
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9063
|
+
const apiHeaders = {
|
|
9064
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
9065
|
+
};
|
|
9066
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
9067
|
+
}
|
|
9068
|
+
listKnowledgeRevisions(paramsOrFirst, ...rest) {
|
|
9069
|
+
let params;
|
|
9070
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9071
|
+
params = (paramsOrFirst || {});
|
|
9072
|
+
}
|
|
9073
|
+
else {
|
|
9074
|
+
params = {
|
|
9075
|
+
knowledgeId: paramsOrFirst,
|
|
9076
|
+
scope: rest[0],
|
|
9077
|
+
userId: rest[1],
|
|
9078
|
+
agentId: rest[2],
|
|
9079
|
+
sessionId: rest[3],
|
|
9080
|
+
runId: rest[4],
|
|
9081
|
+
memorySubStoreId: rest[5],
|
|
9082
|
+
limit: rest[6],
|
|
9083
|
+
offset: rest[7]
|
|
9084
|
+
};
|
|
9085
|
+
}
|
|
9086
|
+
const knowledgeId = params.knowledgeId;
|
|
9087
|
+
const scope = params.scope;
|
|
9088
|
+
const userId = params.userId;
|
|
9089
|
+
const agentId = params.agentId;
|
|
9090
|
+
const sessionId = params.sessionId;
|
|
9091
|
+
const runId = params.runId;
|
|
9092
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
9093
|
+
const limit = params.limit;
|
|
9094
|
+
const offset = params.offset;
|
|
9095
|
+
if (typeof knowledgeId === 'undefined') {
|
|
9096
|
+
throw new AgentbaseException('Missing required parameter: "knowledgeId"');
|
|
9097
|
+
}
|
|
9098
|
+
const apiPath = '/memory/memories/knowledge/{knowledgeId}/revisions'.replace('{knowledgeId}', knowledgeId);
|
|
8732
9099
|
const payload = {};
|
|
8733
9100
|
if (typeof scope !== 'undefined') {
|
|
8734
9101
|
payload['scope'] = scope;
|
|
@@ -8748,21 +9115,17 @@ class Memory {
|
|
|
8748
9115
|
if (typeof memorySubStoreId !== 'undefined') {
|
|
8749
9116
|
payload['memorySubStoreId'] = memorySubStoreId;
|
|
8750
9117
|
}
|
|
8751
|
-
if (typeof
|
|
8752
|
-
payload['
|
|
8753
|
-
}
|
|
8754
|
-
if (typeof reason !== 'undefined') {
|
|
8755
|
-
payload['reason'] = reason;
|
|
9118
|
+
if (typeof limit !== 'undefined') {
|
|
9119
|
+
payload['limit'] = limit;
|
|
8756
9120
|
}
|
|
8757
|
-
if (typeof
|
|
8758
|
-
payload['
|
|
9121
|
+
if (typeof offset !== 'undefined') {
|
|
9122
|
+
payload['offset'] = offset;
|
|
8759
9123
|
}
|
|
8760
9124
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
8761
9125
|
const apiHeaders = {
|
|
8762
9126
|
'X-Appwrite-Project': this.client.config.project,
|
|
8763
|
-
'content-type': 'application/json',
|
|
8764
9127
|
};
|
|
8765
|
-
return this.client.call('
|
|
9128
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
8766
9129
|
}
|
|
8767
9130
|
createKnowledgeObservation(paramsOrFirst, ...rest) {
|
|
8768
9131
|
let params;
|
|
@@ -8992,7 +9355,7 @@ class Memory {
|
|
|
8992
9355
|
}
|
|
8993
9356
|
search(paramsOrFirst, ...rest) {
|
|
8994
9357
|
let params;
|
|
8995
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9358
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
8996
9359
|
params = (paramsOrFirst || {});
|
|
8997
9360
|
}
|
|
8998
9361
|
else {
|
|
@@ -9000,25 +9363,27 @@ class Memory {
|
|
|
9000
9363
|
query: paramsOrFirst,
|
|
9001
9364
|
searchMode: rest[0],
|
|
9002
9365
|
retrieval: rest[1],
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9366
|
+
media: rest[2],
|
|
9367
|
+
userId: rest[3],
|
|
9368
|
+
agentId: rest[4],
|
|
9369
|
+
runId: rest[5],
|
|
9370
|
+
scope: rest[6],
|
|
9371
|
+
memoryType: rest[7],
|
|
9372
|
+
recordKind: rest[8],
|
|
9373
|
+
filter: rest[9],
|
|
9374
|
+
limit: rest[10],
|
|
9375
|
+
cursor: rest[11],
|
|
9376
|
+
sort: rest[12],
|
|
9377
|
+
memorySubStoreId: rest[13],
|
|
9378
|
+
sessionId: rest[14],
|
|
9379
|
+
groupId: rest[15],
|
|
9380
|
+
accessMode: rest[16]
|
|
9017
9381
|
};
|
|
9018
9382
|
}
|
|
9019
9383
|
const query = params.query;
|
|
9020
9384
|
const searchMode = params.searchMode;
|
|
9021
9385
|
const retrieval = params.retrieval;
|
|
9386
|
+
const media = params.media;
|
|
9022
9387
|
const userId = params.userId;
|
|
9023
9388
|
const agentId = params.agentId;
|
|
9024
9389
|
const runId = params.runId;
|
|
@@ -9033,9 +9398,6 @@ class Memory {
|
|
|
9033
9398
|
const sessionId = params.sessionId;
|
|
9034
9399
|
const groupId = params.groupId;
|
|
9035
9400
|
const accessMode = params.accessMode;
|
|
9036
|
-
if (typeof query === 'undefined') {
|
|
9037
|
-
throw new AgentbaseException('Missing required parameter: "query"');
|
|
9038
|
-
}
|
|
9039
9401
|
const apiPath = '/memory/memories/search';
|
|
9040
9402
|
const payload = {};
|
|
9041
9403
|
if (typeof query !== 'undefined') {
|
|
@@ -9047,6 +9409,9 @@ class Memory {
|
|
|
9047
9409
|
if (typeof retrieval !== 'undefined') {
|
|
9048
9410
|
payload['retrieval'] = retrieval;
|
|
9049
9411
|
}
|
|
9412
|
+
if (typeof media !== 'undefined') {
|
|
9413
|
+
payload['media'] = media;
|
|
9414
|
+
}
|
|
9050
9415
|
if (typeof userId !== 'undefined') {
|
|
9051
9416
|
payload['userId'] = userId;
|
|
9052
9417
|
}
|
|
@@ -9456,14 +9821,16 @@ class Memory {
|
|
|
9456
9821
|
else {
|
|
9457
9822
|
params = {
|
|
9458
9823
|
userId: paramsOrFirst,
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9824
|
+
pipelineId: rest[0],
|
|
9825
|
+
profileType: rest[1],
|
|
9826
|
+
messages: rest[2],
|
|
9827
|
+
sourceMemoryIds: rest[3],
|
|
9828
|
+
sessionId: rest[4],
|
|
9829
|
+
mode: rest[5]
|
|
9464
9830
|
};
|
|
9465
9831
|
}
|
|
9466
9832
|
const userId = params.userId;
|
|
9833
|
+
const pipelineId = params.pipelineId;
|
|
9467
9834
|
const profileType = params.profileType;
|
|
9468
9835
|
const messages = params.messages;
|
|
9469
9836
|
const sourceMemoryIds = params.sourceMemoryIds;
|
|
@@ -9474,6 +9841,9 @@ class Memory {
|
|
|
9474
9841
|
}
|
|
9475
9842
|
const apiPath = '/memory/memories/users/{userId}/profile/extractions'.replace('{userId}', userId);
|
|
9476
9843
|
const payload = {};
|
|
9844
|
+
if (typeof pipelineId !== 'undefined') {
|
|
9845
|
+
payload['pipelineId'] = pipelineId;
|
|
9846
|
+
}
|
|
9477
9847
|
if (typeof profileType !== 'undefined') {
|
|
9478
9848
|
payload['profileType'] = profileType;
|
|
9479
9849
|
}
|
|
@@ -9504,16 +9874,21 @@ class Memory {
|
|
|
9504
9874
|
else {
|
|
9505
9875
|
params = {
|
|
9506
9876
|
userId: paramsOrFirst,
|
|
9507
|
-
|
|
9877
|
+
pipelineId: rest[0],
|
|
9878
|
+
profileType: rest[1]
|
|
9508
9879
|
};
|
|
9509
9880
|
}
|
|
9510
9881
|
const userId = params.userId;
|
|
9882
|
+
const pipelineId = params.pipelineId;
|
|
9511
9883
|
const profileType = params.profileType;
|
|
9512
9884
|
if (typeof userId === 'undefined') {
|
|
9513
9885
|
throw new AgentbaseException('Missing required parameter: "userId"');
|
|
9514
9886
|
}
|
|
9515
9887
|
const apiPath = '/memory/memories/users/{userId}/profile/rebuild'.replace('{userId}', userId);
|
|
9516
9888
|
const payload = {};
|
|
9889
|
+
if (typeof pipelineId !== 'undefined') {
|
|
9890
|
+
payload['pipelineId'] = pipelineId;
|
|
9891
|
+
}
|
|
9517
9892
|
if (typeof profileType !== 'undefined') {
|
|
9518
9893
|
payload['profileType'] = profileType;
|
|
9519
9894
|
}
|
|
@@ -9627,11 +10002,13 @@ class Memory {
|
|
|
9627
10002
|
else {
|
|
9628
10003
|
params = {
|
|
9629
10004
|
memoryId: paramsOrFirst,
|
|
9630
|
-
|
|
9631
|
-
|
|
10005
|
+
memorySubStoreId: rest[0],
|
|
10006
|
+
reason: rest[1],
|
|
10007
|
+
source: rest[2]
|
|
9632
10008
|
};
|
|
9633
10009
|
}
|
|
9634
10010
|
const memoryId = params.memoryId;
|
|
10011
|
+
const memorySubStoreId = params.memorySubStoreId;
|
|
9635
10012
|
const reason = params.reason;
|
|
9636
10013
|
const source = params.source;
|
|
9637
10014
|
if (typeof memoryId === 'undefined') {
|
|
@@ -9639,6 +10016,9 @@ class Memory {
|
|
|
9639
10016
|
}
|
|
9640
10017
|
const apiPath = '/memory/memories/{memoryId}'.replace('{memoryId}', memoryId);
|
|
9641
10018
|
const payload = {};
|
|
10019
|
+
if (typeof memorySubStoreId !== 'undefined') {
|
|
10020
|
+
payload['memorySubStoreId'] = memorySubStoreId;
|
|
10021
|
+
}
|
|
9642
10022
|
if (typeof reason !== 'undefined') {
|
|
9643
10023
|
payload['reason'] = reason;
|
|
9644
10024
|
}
|
|
@@ -9778,6 +10158,340 @@ class Memory {
|
|
|
9778
10158
|
};
|
|
9779
10159
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
9780
10160
|
}
|
|
10161
|
+
listPipelines(paramsOrFirst) {
|
|
10162
|
+
let params;
|
|
10163
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst))) {
|
|
10164
|
+
params = (paramsOrFirst || {});
|
|
10165
|
+
}
|
|
10166
|
+
else {
|
|
10167
|
+
params = {
|
|
10168
|
+
scenario: paramsOrFirst
|
|
10169
|
+
};
|
|
10170
|
+
}
|
|
10171
|
+
const scenario = params.scenario;
|
|
10172
|
+
const apiPath = '/memory/pipelines';
|
|
10173
|
+
const payload = {};
|
|
10174
|
+
if (typeof scenario !== 'undefined') {
|
|
10175
|
+
payload['scenario'] = scenario;
|
|
10176
|
+
}
|
|
10177
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10178
|
+
const apiHeaders = {
|
|
10179
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10180
|
+
};
|
|
10181
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10182
|
+
}
|
|
10183
|
+
createPipeline(paramsOrFirst, ...rest) {
|
|
10184
|
+
let params;
|
|
10185
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst || 'fromDefaults' in paramsOrFirst || 'config' in paramsOrFirst))) {
|
|
10186
|
+
params = (paramsOrFirst || {});
|
|
10187
|
+
}
|
|
10188
|
+
else {
|
|
10189
|
+
params = {
|
|
10190
|
+
scenario: paramsOrFirst,
|
|
10191
|
+
fromDefaults: rest[0],
|
|
10192
|
+
config: rest[1]
|
|
10193
|
+
};
|
|
10194
|
+
}
|
|
10195
|
+
const scenario = params.scenario;
|
|
10196
|
+
const fromDefaults = params.fromDefaults;
|
|
10197
|
+
const config = params.config;
|
|
10198
|
+
const apiPath = '/memory/pipelines';
|
|
10199
|
+
const payload = {};
|
|
10200
|
+
if (typeof scenario !== 'undefined') {
|
|
10201
|
+
payload['scenario'] = scenario;
|
|
10202
|
+
}
|
|
10203
|
+
if (typeof fromDefaults !== 'undefined') {
|
|
10204
|
+
payload['fromDefaults'] = fromDefaults;
|
|
10205
|
+
}
|
|
10206
|
+
if (typeof config !== 'undefined') {
|
|
10207
|
+
payload['config'] = config;
|
|
10208
|
+
}
|
|
10209
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10210
|
+
const apiHeaders = {
|
|
10211
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10212
|
+
'content-type': 'application/json',
|
|
10213
|
+
};
|
|
10214
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
10215
|
+
}
|
|
10216
|
+
setDefaultPipeline(paramsOrFirst, ...rest) {
|
|
10217
|
+
let params;
|
|
10218
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scenario' in paramsOrFirst || 'pipelineId' in paramsOrFirst || 'expectedRevision' in paramsOrFirst))) {
|
|
10219
|
+
params = (paramsOrFirst || {});
|
|
10220
|
+
}
|
|
10221
|
+
else {
|
|
10222
|
+
params = {
|
|
10223
|
+
scenario: paramsOrFirst,
|
|
10224
|
+
pipelineId: rest[0],
|
|
10225
|
+
expectedRevision: rest[1]
|
|
10226
|
+
};
|
|
10227
|
+
}
|
|
10228
|
+
const scenario = params.scenario;
|
|
10229
|
+
const pipelineId = params.pipelineId;
|
|
10230
|
+
const expectedRevision = params.expectedRevision;
|
|
10231
|
+
const apiPath = '/memory/pipelines/default';
|
|
10232
|
+
const payload = {};
|
|
10233
|
+
if (typeof scenario !== 'undefined') {
|
|
10234
|
+
payload['scenario'] = scenario;
|
|
10235
|
+
}
|
|
10236
|
+
if (typeof pipelineId !== 'undefined') {
|
|
10237
|
+
payload['pipelineId'] = pipelineId;
|
|
10238
|
+
}
|
|
10239
|
+
if (typeof expectedRevision !== 'undefined') {
|
|
10240
|
+
payload['expectedRevision'] = expectedRevision;
|
|
10241
|
+
}
|
|
10242
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10243
|
+
const apiHeaders = {
|
|
10244
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10245
|
+
'content-type': 'application/json',
|
|
10246
|
+
};
|
|
10247
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
10248
|
+
}
|
|
10249
|
+
getPipeline(paramsOrFirst) {
|
|
10250
|
+
let params;
|
|
10251
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10252
|
+
params = (paramsOrFirst || {});
|
|
10253
|
+
}
|
|
10254
|
+
else {
|
|
10255
|
+
params = {
|
|
10256
|
+
pipelineId: paramsOrFirst
|
|
10257
|
+
};
|
|
10258
|
+
}
|
|
10259
|
+
const pipelineId = params.pipelineId;
|
|
10260
|
+
if (typeof pipelineId === 'undefined') {
|
|
10261
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10262
|
+
}
|
|
10263
|
+
const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
|
|
10264
|
+
const payload = {};
|
|
10265
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10266
|
+
const apiHeaders = {
|
|
10267
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10268
|
+
};
|
|
10269
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10270
|
+
}
|
|
10271
|
+
updatePipeline(paramsOrFirst, ...rest) {
|
|
10272
|
+
let params;
|
|
10273
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10274
|
+
params = (paramsOrFirst || {});
|
|
10275
|
+
}
|
|
10276
|
+
else {
|
|
10277
|
+
params = {
|
|
10278
|
+
pipelineId: paramsOrFirst,
|
|
10279
|
+
expectedRevision: rest[0],
|
|
10280
|
+
config: rest[1]
|
|
10281
|
+
};
|
|
10282
|
+
}
|
|
10283
|
+
const pipelineId = params.pipelineId;
|
|
10284
|
+
const expectedRevision = params.expectedRevision;
|
|
10285
|
+
const config = params.config;
|
|
10286
|
+
if (typeof pipelineId === 'undefined') {
|
|
10287
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10288
|
+
}
|
|
10289
|
+
if (typeof expectedRevision === 'undefined') {
|
|
10290
|
+
throw new AgentbaseException('Missing required parameter: "expectedRevision"');
|
|
10291
|
+
}
|
|
10292
|
+
if (typeof config === 'undefined') {
|
|
10293
|
+
throw new AgentbaseException('Missing required parameter: "config"');
|
|
10294
|
+
}
|
|
10295
|
+
const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
|
|
10296
|
+
const payload = {};
|
|
10297
|
+
if (typeof expectedRevision !== 'undefined') {
|
|
10298
|
+
payload['expectedRevision'] = expectedRevision;
|
|
10299
|
+
}
|
|
10300
|
+
if (typeof config !== 'undefined') {
|
|
10301
|
+
payload['config'] = config;
|
|
10302
|
+
}
|
|
10303
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10304
|
+
const apiHeaders = {
|
|
10305
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10306
|
+
'content-type': 'application/json',
|
|
10307
|
+
};
|
|
10308
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10309
|
+
}
|
|
10310
|
+
deletePipeline(paramsOrFirst, ...rest) {
|
|
10311
|
+
let params;
|
|
10312
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10313
|
+
params = (paramsOrFirst || {});
|
|
10314
|
+
}
|
|
10315
|
+
else {
|
|
10316
|
+
params = {
|
|
10317
|
+
pipelineId: paramsOrFirst,
|
|
10318
|
+
expectedRevision: rest[0]
|
|
10319
|
+
};
|
|
10320
|
+
}
|
|
10321
|
+
const pipelineId = params.pipelineId;
|
|
10322
|
+
const expectedRevision = params.expectedRevision;
|
|
10323
|
+
if (typeof pipelineId === 'undefined') {
|
|
10324
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10325
|
+
}
|
|
10326
|
+
if (typeof expectedRevision === 'undefined') {
|
|
10327
|
+
throw new AgentbaseException('Missing required parameter: "expectedRevision"');
|
|
10328
|
+
}
|
|
10329
|
+
const apiPath = '/memory/pipelines/{pipelineId}'.replace('{pipelineId}', pipelineId);
|
|
10330
|
+
const payload = {};
|
|
10331
|
+
if (typeof expectedRevision !== 'undefined') {
|
|
10332
|
+
payload['expectedRevision'] = expectedRevision;
|
|
10333
|
+
}
|
|
10334
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10335
|
+
const apiHeaders = {
|
|
10336
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10337
|
+
'content-type': 'application/json',
|
|
10338
|
+
};
|
|
10339
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
10340
|
+
}
|
|
10341
|
+
publishPipeline(paramsOrFirst, ...rest) {
|
|
10342
|
+
let params;
|
|
10343
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10344
|
+
params = (paramsOrFirst || {});
|
|
10345
|
+
}
|
|
10346
|
+
else {
|
|
10347
|
+
params = {
|
|
10348
|
+
pipelineId: paramsOrFirst,
|
|
10349
|
+
versionId: rest[0],
|
|
10350
|
+
expectedRevision: rest[1],
|
|
10351
|
+
makeDefault: rest[2]
|
|
10352
|
+
};
|
|
10353
|
+
}
|
|
10354
|
+
const pipelineId = params.pipelineId;
|
|
10355
|
+
const versionId = params.versionId;
|
|
10356
|
+
const expectedRevision = params.expectedRevision;
|
|
10357
|
+
const makeDefault = params.makeDefault;
|
|
10358
|
+
if (typeof pipelineId === 'undefined') {
|
|
10359
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10360
|
+
}
|
|
10361
|
+
if (typeof versionId === 'undefined') {
|
|
10362
|
+
throw new AgentbaseException('Missing required parameter: "versionId"');
|
|
10363
|
+
}
|
|
10364
|
+
if (typeof expectedRevision === 'undefined') {
|
|
10365
|
+
throw new AgentbaseException('Missing required parameter: "expectedRevision"');
|
|
10366
|
+
}
|
|
10367
|
+
const apiPath = '/memory/pipelines/{pipelineId}/publish'.replace('{pipelineId}', pipelineId);
|
|
10368
|
+
const payload = {};
|
|
10369
|
+
if (typeof versionId !== 'undefined') {
|
|
10370
|
+
payload['versionId'] = versionId;
|
|
10371
|
+
}
|
|
10372
|
+
if (typeof expectedRevision !== 'undefined') {
|
|
10373
|
+
payload['expectedRevision'] = expectedRevision;
|
|
10374
|
+
}
|
|
10375
|
+
if (typeof makeDefault !== 'undefined') {
|
|
10376
|
+
payload['makeDefault'] = makeDefault;
|
|
10377
|
+
}
|
|
10378
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10379
|
+
const apiHeaders = {
|
|
10380
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10381
|
+
'content-type': 'application/json',
|
|
10382
|
+
};
|
|
10383
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
10384
|
+
}
|
|
10385
|
+
rollbackPipeline(paramsOrFirst, ...rest) {
|
|
10386
|
+
let params;
|
|
10387
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10388
|
+
params = (paramsOrFirst || {});
|
|
10389
|
+
}
|
|
10390
|
+
else {
|
|
10391
|
+
params = {
|
|
10392
|
+
pipelineId: paramsOrFirst,
|
|
10393
|
+
versionId: rest[0],
|
|
10394
|
+
expectedRevision: rest[1]
|
|
10395
|
+
};
|
|
10396
|
+
}
|
|
10397
|
+
const pipelineId = params.pipelineId;
|
|
10398
|
+
const versionId = params.versionId;
|
|
10399
|
+
const expectedRevision = params.expectedRevision;
|
|
10400
|
+
if (typeof pipelineId === 'undefined') {
|
|
10401
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10402
|
+
}
|
|
10403
|
+
if (typeof versionId === 'undefined') {
|
|
10404
|
+
throw new AgentbaseException('Missing required parameter: "versionId"');
|
|
10405
|
+
}
|
|
10406
|
+
if (typeof expectedRevision === 'undefined') {
|
|
10407
|
+
throw new AgentbaseException('Missing required parameter: "expectedRevision"');
|
|
10408
|
+
}
|
|
10409
|
+
const apiPath = '/memory/pipelines/{pipelineId}/rollback'.replace('{pipelineId}', pipelineId);
|
|
10410
|
+
const payload = {};
|
|
10411
|
+
if (typeof versionId !== 'undefined') {
|
|
10412
|
+
payload['versionId'] = versionId;
|
|
10413
|
+
}
|
|
10414
|
+
if (typeof expectedRevision !== 'undefined') {
|
|
10415
|
+
payload['expectedRevision'] = expectedRevision;
|
|
10416
|
+
}
|
|
10417
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10418
|
+
const apiHeaders = {
|
|
10419
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10420
|
+
'content-type': 'application/json',
|
|
10421
|
+
};
|
|
10422
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
10423
|
+
}
|
|
10424
|
+
validatePipeline(paramsOrFirst, ...rest) {
|
|
10425
|
+
let params;
|
|
10426
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10427
|
+
params = (paramsOrFirst || {});
|
|
10428
|
+
}
|
|
10429
|
+
else {
|
|
10430
|
+
params = {
|
|
10431
|
+
pipelineId: paramsOrFirst,
|
|
10432
|
+
versionId: rest[0],
|
|
10433
|
+
data: rest[1]
|
|
10434
|
+
};
|
|
10435
|
+
}
|
|
10436
|
+
const pipelineId = params.pipelineId;
|
|
10437
|
+
const versionId = params.versionId;
|
|
10438
|
+
const data = params.data;
|
|
10439
|
+
if (typeof pipelineId === 'undefined') {
|
|
10440
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10441
|
+
}
|
|
10442
|
+
if (typeof versionId === 'undefined') {
|
|
10443
|
+
throw new AgentbaseException('Missing required parameter: "versionId"');
|
|
10444
|
+
}
|
|
10445
|
+
if (typeof data === 'undefined') {
|
|
10446
|
+
throw new AgentbaseException('Missing required parameter: "data"');
|
|
10447
|
+
}
|
|
10448
|
+
const apiPath = '/memory/pipelines/{pipelineId}/validate'.replace('{pipelineId}', pipelineId);
|
|
10449
|
+
const payload = {};
|
|
10450
|
+
if (typeof versionId !== 'undefined') {
|
|
10451
|
+
payload['versionId'] = versionId;
|
|
10452
|
+
}
|
|
10453
|
+
if (typeof data !== 'undefined') {
|
|
10454
|
+
payload['data'] = data;
|
|
10455
|
+
}
|
|
10456
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10457
|
+
const apiHeaders = {
|
|
10458
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10459
|
+
'content-type': 'application/json',
|
|
10460
|
+
};
|
|
10461
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
10462
|
+
}
|
|
10463
|
+
listPipelineVersions(paramsOrFirst, ...rest) {
|
|
10464
|
+
let params;
|
|
10465
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10466
|
+
params = (paramsOrFirst || {});
|
|
10467
|
+
}
|
|
10468
|
+
else {
|
|
10469
|
+
params = {
|
|
10470
|
+
pipelineId: paramsOrFirst,
|
|
10471
|
+
versionId: rest[0],
|
|
10472
|
+
beforeRevision: rest[1]
|
|
10473
|
+
};
|
|
10474
|
+
}
|
|
10475
|
+
const pipelineId = params.pipelineId;
|
|
10476
|
+
const versionId = params.versionId;
|
|
10477
|
+
const beforeRevision = params.beforeRevision;
|
|
10478
|
+
if (typeof pipelineId === 'undefined') {
|
|
10479
|
+
throw new AgentbaseException('Missing required parameter: "pipelineId"');
|
|
10480
|
+
}
|
|
10481
|
+
const apiPath = '/memory/pipelines/{pipelineId}/versions'.replace('{pipelineId}', pipelineId);
|
|
10482
|
+
const payload = {};
|
|
10483
|
+
if (typeof versionId !== 'undefined') {
|
|
10484
|
+
payload['versionId'] = versionId;
|
|
10485
|
+
}
|
|
10486
|
+
if (typeof beforeRevision !== 'undefined') {
|
|
10487
|
+
payload['beforeRevision'] = beforeRevision;
|
|
10488
|
+
}
|
|
10489
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10490
|
+
const apiHeaders = {
|
|
10491
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
10492
|
+
};
|
|
10493
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10494
|
+
}
|
|
9781
10495
|
}
|
|
9782
10496
|
|
|
9783
10497
|
class Messaging {
|
|
@@ -13493,6 +14207,10 @@ exports.Status = void 0;
|
|
|
13493
14207
|
Status["PartialFailed"] = "partial_failed";
|
|
13494
14208
|
Status["Failed"] = "failed";
|
|
13495
14209
|
Status["Dead"] = "dead";
|
|
14210
|
+
Status["Pending"] = "pending";
|
|
14211
|
+
Status["Approved"] = "approved";
|
|
14212
|
+
Status["Rejected"] = "rejected";
|
|
14213
|
+
Status["Superseded"] = "superseded";
|
|
13496
14214
|
})(exports.Status || (exports.Status = {}));
|
|
13497
14215
|
|
|
13498
14216
|
exports.Browser = void 0;
|
|
@@ -14197,6 +14915,23 @@ exports.ImageFormat = void 0;
|
|
|
14197
14915
|
ImageFormat["Gif"] = "gif";
|
|
14198
14916
|
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
14199
14917
|
|
|
14918
|
+
exports.PathMatch = void 0;
|
|
14919
|
+
(function (PathMatch) {
|
|
14920
|
+
PathMatch["Exact"] = "exact";
|
|
14921
|
+
PathMatch["Regex"] = "regex";
|
|
14922
|
+
})(exports.PathMatch || (exports.PathMatch = {}));
|
|
14923
|
+
|
|
14924
|
+
exports.Method = void 0;
|
|
14925
|
+
(function (Method) {
|
|
14926
|
+
Method["GET"] = "GET";
|
|
14927
|
+
Method["POST"] = "POST";
|
|
14928
|
+
Method["PUT"] = "PUT";
|
|
14929
|
+
Method["PATCH"] = "PATCH";
|
|
14930
|
+
Method["DELETE"] = "DELETE";
|
|
14931
|
+
Method["OPTIONS"] = "OPTIONS";
|
|
14932
|
+
Method["HEAD"] = "HEAD";
|
|
14933
|
+
})(exports.Method || (exports.Method = {}));
|
|
14934
|
+
|
|
14200
14935
|
exports.ExecutionMethod = void 0;
|
|
14201
14936
|
(function (ExecutionMethod) {
|
|
14202
14937
|
ExecutionMethod["GET"] = "GET";
|
|
@@ -14352,6 +15087,14 @@ exports.MemoryShareSubjectType = void 0;
|
|
|
14352
15087
|
MemoryShareSubjectType["Group"] = "group";
|
|
14353
15088
|
})(exports.MemoryShareSubjectType || (exports.MemoryShareSubjectType = {}));
|
|
14354
15089
|
|
|
15090
|
+
exports.Scenario = void 0;
|
|
15091
|
+
(function (Scenario) {
|
|
15092
|
+
Scenario["AddMemory"] = "add_memory";
|
|
15093
|
+
Scenario["Profile"] = "profile";
|
|
15094
|
+
Scenario["Distillation"] = "distillation";
|
|
15095
|
+
Scenario["Forgetting"] = "forgetting";
|
|
15096
|
+
})(exports.Scenario || (exports.Scenario = {}));
|
|
15097
|
+
|
|
14355
15098
|
exports.OrganizationRole = void 0;
|
|
14356
15099
|
(function (OrganizationRole) {
|
|
14357
15100
|
OrganizationRole["Owner"] = "owner";
|