@memnexus-ai/typescript-sdk 1.10.1 → 1.11.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 +4 -0
- package/dist/index.d.ts +225 -126
- package/dist/index.js +538 -356
- package/dist/index.mjs +531 -353
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4272,169 +4272,42 @@ var createMemoryResponseRequest = z62.lazy(() => {
|
|
|
4272
4272
|
}));
|
|
4273
4273
|
});
|
|
4274
4274
|
|
|
4275
|
-
// src/services/memories/models/search-
|
|
4275
|
+
// src/services/memories/models/search-response.ts
|
|
4276
|
+
import { z as z72 } from "zod";
|
|
4277
|
+
|
|
4278
|
+
// src/services/memories/models/search-result.ts
|
|
4279
|
+
import { z as z67 } from "zod";
|
|
4280
|
+
|
|
4281
|
+
// src/services/memories/models/search-result-memory.ts
|
|
4276
4282
|
import { z as z63 } from "zod";
|
|
4277
|
-
var
|
|
4283
|
+
var searchResultMemory = z63.lazy(() => {
|
|
4278
4284
|
return z63.object({
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
offset: z63.number().gte(0).optional(),
|
|
4284
|
-
vectorWeight: z63.number().gte(0).lte(1).optional(),
|
|
4285
|
-
fulltextWeight: z63.number().gte(0).lte(1).optional(),
|
|
4286
|
-
threshold: z63.number().gte(0).lte(1).optional(),
|
|
4287
|
-
explain: z63.boolean().optional(),
|
|
4288
|
-
asOfTime: z63.string().optional(),
|
|
4289
|
-
validAtTime: z63.string().optional(),
|
|
4290
|
-
eventTimeFrom: z63.string().optional(),
|
|
4291
|
-
eventTimeTo: z63.string().optional(),
|
|
4292
|
-
ingestionTimeFrom: z63.string().optional(),
|
|
4293
|
-
ingestionTimeTo: z63.string().optional(),
|
|
4294
|
-
includeExpired: z63.boolean().optional(),
|
|
4295
|
-
temporalMode: z63.string().optional(),
|
|
4285
|
+
id: z63.string(),
|
|
4286
|
+
content: z63.string(),
|
|
4287
|
+
memoryType: z63.string(),
|
|
4288
|
+
context: z63.string().optional(),
|
|
4296
4289
|
topics: z63.array(z63.string()).optional(),
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4290
|
+
timestamp: z63.string().optional(),
|
|
4291
|
+
eventTime: z63.string().optional(),
|
|
4292
|
+
validFrom: z63.string().optional(),
|
|
4293
|
+
validTo: z63.string().optional().nullable(),
|
|
4294
|
+
createdAt: z63.string(),
|
|
4295
|
+
updatedAt: z63.string()
|
|
4301
4296
|
});
|
|
4302
4297
|
});
|
|
4303
|
-
var
|
|
4304
|
-
return z63.object({
|
|
4305
|
-
query: z63.string().min(1),
|
|
4306
|
-
mode: z63.string().optional(),
|
|
4307
|
-
searchMethod: z63.string().optional(),
|
|
4308
|
-
limit: z63.number().gte(1).lte(100).optional(),
|
|
4309
|
-
offset: z63.number().gte(0).optional(),
|
|
4310
|
-
vectorWeight: z63.number().gte(0).lte(1).optional(),
|
|
4311
|
-
fulltextWeight: z63.number().gte(0).lte(1).optional(),
|
|
4312
|
-
threshold: z63.number().gte(0).lte(1).optional(),
|
|
4313
|
-
explain: z63.boolean().optional(),
|
|
4314
|
-
asOfTime: z63.string().optional(),
|
|
4315
|
-
validAtTime: z63.string().optional(),
|
|
4316
|
-
eventTimeFrom: z63.string().optional(),
|
|
4317
|
-
eventTimeTo: z63.string().optional(),
|
|
4318
|
-
ingestionTimeFrom: z63.string().optional(),
|
|
4319
|
-
ingestionTimeTo: z63.string().optional(),
|
|
4320
|
-
includeExpired: z63.boolean().optional(),
|
|
4321
|
-
temporalMode: z63.string().optional(),
|
|
4322
|
-
topics: z63.array(z63.string()).optional(),
|
|
4323
|
-
memoryType: z63.string().optional(),
|
|
4324
|
-
conversationId: z63.string().optional(),
|
|
4325
|
-
includeTopics: z63.boolean().optional(),
|
|
4326
|
-
includeEntities: z63.boolean().optional()
|
|
4327
|
-
}).transform((data) => ({
|
|
4328
|
-
query: data["query"],
|
|
4329
|
-
mode: data["mode"],
|
|
4330
|
-
searchMethod: data["searchMethod"],
|
|
4331
|
-
limit: data["limit"],
|
|
4332
|
-
offset: data["offset"],
|
|
4333
|
-
vectorWeight: data["vectorWeight"],
|
|
4334
|
-
fulltextWeight: data["fulltextWeight"],
|
|
4335
|
-
threshold: data["threshold"],
|
|
4336
|
-
explain: data["explain"],
|
|
4337
|
-
asOfTime: data["asOfTime"],
|
|
4338
|
-
validAtTime: data["validAtTime"],
|
|
4339
|
-
eventTimeFrom: data["eventTimeFrom"],
|
|
4340
|
-
eventTimeTo: data["eventTimeTo"],
|
|
4341
|
-
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4342
|
-
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4343
|
-
includeExpired: data["includeExpired"],
|
|
4344
|
-
temporalMode: data["temporalMode"],
|
|
4345
|
-
topics: data["topics"],
|
|
4346
|
-
memoryType: data["memoryType"],
|
|
4347
|
-
conversationId: data["conversationId"],
|
|
4348
|
-
includeTopics: data["includeTopics"],
|
|
4349
|
-
includeEntities: data["includeEntities"]
|
|
4350
|
-
}));
|
|
4351
|
-
});
|
|
4352
|
-
var searchRequestRequest = z63.lazy(() => {
|
|
4298
|
+
var searchResultMemoryResponse = z63.lazy(() => {
|
|
4353
4299
|
return z63.object({
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
offset: z63.number().gte(0).optional(),
|
|
4359
|
-
vectorWeight: z63.number().gte(0).lte(1).optional(),
|
|
4360
|
-
fulltextWeight: z63.number().gte(0).lte(1).optional(),
|
|
4361
|
-
threshold: z63.number().gte(0).lte(1).optional(),
|
|
4362
|
-
explain: z63.boolean().optional(),
|
|
4363
|
-
asOfTime: z63.string().optional(),
|
|
4364
|
-
validAtTime: z63.string().optional(),
|
|
4365
|
-
eventTimeFrom: z63.string().optional(),
|
|
4366
|
-
eventTimeTo: z63.string().optional(),
|
|
4367
|
-
ingestionTimeFrom: z63.string().optional(),
|
|
4368
|
-
ingestionTimeTo: z63.string().optional(),
|
|
4369
|
-
includeExpired: z63.boolean().optional(),
|
|
4370
|
-
temporalMode: z63.string().optional(),
|
|
4300
|
+
id: z63.string(),
|
|
4301
|
+
content: z63.string(),
|
|
4302
|
+
memoryType: z63.string(),
|
|
4303
|
+
context: z63.string().optional(),
|
|
4371
4304
|
topics: z63.array(z63.string()).optional(),
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
mode: data["mode"],
|
|
4379
|
-
searchMethod: data["searchMethod"],
|
|
4380
|
-
limit: data["limit"],
|
|
4381
|
-
offset: data["offset"],
|
|
4382
|
-
vectorWeight: data["vectorWeight"],
|
|
4383
|
-
fulltextWeight: data["fulltextWeight"],
|
|
4384
|
-
threshold: data["threshold"],
|
|
4385
|
-
explain: data["explain"],
|
|
4386
|
-
asOfTime: data["asOfTime"],
|
|
4387
|
-
validAtTime: data["validAtTime"],
|
|
4388
|
-
eventTimeFrom: data["eventTimeFrom"],
|
|
4389
|
-
eventTimeTo: data["eventTimeTo"],
|
|
4390
|
-
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4391
|
-
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4392
|
-
includeExpired: data["includeExpired"],
|
|
4393
|
-
temporalMode: data["temporalMode"],
|
|
4394
|
-
topics: data["topics"],
|
|
4395
|
-
memoryType: data["memoryType"],
|
|
4396
|
-
conversationId: data["conversationId"],
|
|
4397
|
-
includeTopics: data["includeTopics"],
|
|
4398
|
-
includeEntities: data["includeEntities"]
|
|
4399
|
-
}));
|
|
4400
|
-
});
|
|
4401
|
-
|
|
4402
|
-
// src/services/memories/models/search-response.ts
|
|
4403
|
-
import { z as z73 } from "zod";
|
|
4404
|
-
|
|
4405
|
-
// src/services/memories/models/search-result.ts
|
|
4406
|
-
import { z as z68 } from "zod";
|
|
4407
|
-
|
|
4408
|
-
// src/services/memories/models/search-result-memory.ts
|
|
4409
|
-
import { z as z64 } from "zod";
|
|
4410
|
-
var searchResultMemory = z64.lazy(() => {
|
|
4411
|
-
return z64.object({
|
|
4412
|
-
id: z64.string(),
|
|
4413
|
-
content: z64.string(),
|
|
4414
|
-
memoryType: z64.string(),
|
|
4415
|
-
context: z64.string().optional(),
|
|
4416
|
-
topics: z64.array(z64.string()).optional(),
|
|
4417
|
-
timestamp: z64.string().optional(),
|
|
4418
|
-
eventTime: z64.string().optional(),
|
|
4419
|
-
validFrom: z64.string().optional(),
|
|
4420
|
-
validTo: z64.string().optional().nullable(),
|
|
4421
|
-
createdAt: z64.string(),
|
|
4422
|
-
updatedAt: z64.string()
|
|
4423
|
-
});
|
|
4424
|
-
});
|
|
4425
|
-
var searchResultMemoryResponse = z64.lazy(() => {
|
|
4426
|
-
return z64.object({
|
|
4427
|
-
id: z64.string(),
|
|
4428
|
-
content: z64.string(),
|
|
4429
|
-
memoryType: z64.string(),
|
|
4430
|
-
context: z64.string().optional(),
|
|
4431
|
-
topics: z64.array(z64.string()).optional(),
|
|
4432
|
-
timestamp: z64.string().optional(),
|
|
4433
|
-
eventTime: z64.string().optional(),
|
|
4434
|
-
validFrom: z64.string().optional(),
|
|
4435
|
-
validTo: z64.string().optional().nullable(),
|
|
4436
|
-
createdAt: z64.string(),
|
|
4437
|
-
updatedAt: z64.string()
|
|
4305
|
+
timestamp: z63.string().optional(),
|
|
4306
|
+
eventTime: z63.string().optional(),
|
|
4307
|
+
validFrom: z63.string().optional(),
|
|
4308
|
+
validTo: z63.string().optional().nullable(),
|
|
4309
|
+
createdAt: z63.string(),
|
|
4310
|
+
updatedAt: z63.string()
|
|
4438
4311
|
}).transform((data) => ({
|
|
4439
4312
|
id: data["id"],
|
|
4440
4313
|
content: data["content"],
|
|
@@ -4449,19 +4322,19 @@ var searchResultMemoryResponse = z64.lazy(() => {
|
|
|
4449
4322
|
updatedAt: data["updatedAt"]
|
|
4450
4323
|
}));
|
|
4451
4324
|
});
|
|
4452
|
-
var searchResultMemoryRequest =
|
|
4453
|
-
return
|
|
4454
|
-
id:
|
|
4455
|
-
content:
|
|
4456
|
-
memoryType:
|
|
4457
|
-
context:
|
|
4458
|
-
topics:
|
|
4459
|
-
timestamp:
|
|
4460
|
-
eventTime:
|
|
4461
|
-
validFrom:
|
|
4462
|
-
validTo:
|
|
4463
|
-
createdAt:
|
|
4464
|
-
updatedAt:
|
|
4325
|
+
var searchResultMemoryRequest = z63.lazy(() => {
|
|
4326
|
+
return z63.object({
|
|
4327
|
+
id: z63.string(),
|
|
4328
|
+
content: z63.string(),
|
|
4329
|
+
memoryType: z63.string(),
|
|
4330
|
+
context: z63.string().optional(),
|
|
4331
|
+
topics: z63.array(z63.string()).optional(),
|
|
4332
|
+
timestamp: z63.string().optional(),
|
|
4333
|
+
eventTime: z63.string().optional(),
|
|
4334
|
+
validFrom: z63.string().optional(),
|
|
4335
|
+
validTo: z63.string().optional().nullable(),
|
|
4336
|
+
createdAt: z63.string(),
|
|
4337
|
+
updatedAt: z63.string()
|
|
4465
4338
|
}).transform((data) => ({
|
|
4466
4339
|
id: data["id"],
|
|
4467
4340
|
content: data["content"],
|
|
@@ -4478,26 +4351,26 @@ var searchResultMemoryRequest = z64.lazy(() => {
|
|
|
4478
4351
|
});
|
|
4479
4352
|
|
|
4480
4353
|
// src/services/memories/models/entity.ts
|
|
4481
|
-
import { z as
|
|
4482
|
-
var entity =
|
|
4483
|
-
return
|
|
4484
|
-
name:
|
|
4485
|
-
type:
|
|
4354
|
+
import { z as z64 } from "zod";
|
|
4355
|
+
var entity = z64.lazy(() => {
|
|
4356
|
+
return z64.object({
|
|
4357
|
+
name: z64.string().optional(),
|
|
4358
|
+
type: z64.string().optional()
|
|
4486
4359
|
});
|
|
4487
4360
|
});
|
|
4488
|
-
var entityResponse =
|
|
4489
|
-
return
|
|
4490
|
-
name:
|
|
4491
|
-
type:
|
|
4361
|
+
var entityResponse = z64.lazy(() => {
|
|
4362
|
+
return z64.object({
|
|
4363
|
+
name: z64.string().optional(),
|
|
4364
|
+
type: z64.string().optional()
|
|
4492
4365
|
}).transform((data) => ({
|
|
4493
4366
|
name: data["name"],
|
|
4494
4367
|
type: data["type"]
|
|
4495
4368
|
}));
|
|
4496
4369
|
});
|
|
4497
|
-
var entityRequest =
|
|
4498
|
-
return
|
|
4499
|
-
name:
|
|
4500
|
-
type:
|
|
4370
|
+
var entityRequest = z64.lazy(() => {
|
|
4371
|
+
return z64.object({
|
|
4372
|
+
name: z64.string().optional(),
|
|
4373
|
+
type: z64.string().optional()
|
|
4501
4374
|
}).transform((data) => ({
|
|
4502
4375
|
name: data["name"],
|
|
4503
4376
|
type: data["type"]
|
|
@@ -4505,30 +4378,30 @@ var entityRequest = z65.lazy(() => {
|
|
|
4505
4378
|
});
|
|
4506
4379
|
|
|
4507
4380
|
// src/services/memories/models/topic-reference.ts
|
|
4508
|
-
import { z as
|
|
4509
|
-
var topicReference =
|
|
4510
|
-
return
|
|
4511
|
-
id:
|
|
4512
|
-
name:
|
|
4513
|
-
createdAt:
|
|
4381
|
+
import { z as z65 } from "zod";
|
|
4382
|
+
var topicReference = z65.lazy(() => {
|
|
4383
|
+
return z65.object({
|
|
4384
|
+
id: z65.string(),
|
|
4385
|
+
name: z65.string(),
|
|
4386
|
+
createdAt: z65.string().optional()
|
|
4514
4387
|
});
|
|
4515
4388
|
});
|
|
4516
|
-
var topicReferenceResponse =
|
|
4517
|
-
return
|
|
4518
|
-
id:
|
|
4519
|
-
name:
|
|
4520
|
-
createdAt:
|
|
4389
|
+
var topicReferenceResponse = z65.lazy(() => {
|
|
4390
|
+
return z65.object({
|
|
4391
|
+
id: z65.string(),
|
|
4392
|
+
name: z65.string(),
|
|
4393
|
+
createdAt: z65.string().optional()
|
|
4521
4394
|
}).transform((data) => ({
|
|
4522
4395
|
id: data["id"],
|
|
4523
4396
|
name: data["name"],
|
|
4524
4397
|
createdAt: data["createdAt"]
|
|
4525
4398
|
}));
|
|
4526
4399
|
});
|
|
4527
|
-
var topicReferenceRequest =
|
|
4528
|
-
return
|
|
4529
|
-
id:
|
|
4530
|
-
name:
|
|
4531
|
-
createdAt:
|
|
4400
|
+
var topicReferenceRequest = z65.lazy(() => {
|
|
4401
|
+
return z65.object({
|
|
4402
|
+
id: z65.string(),
|
|
4403
|
+
name: z65.string(),
|
|
4404
|
+
createdAt: z65.string().optional()
|
|
4532
4405
|
}).transform((data) => ({
|
|
4533
4406
|
id: data["id"],
|
|
4534
4407
|
name: data["name"],
|
|
@@ -4537,21 +4410,21 @@ var topicReferenceRequest = z66.lazy(() => {
|
|
|
4537
4410
|
});
|
|
4538
4411
|
|
|
4539
4412
|
// src/services/memories/models/explanation.ts
|
|
4540
|
-
import { z as
|
|
4541
|
-
var explanation =
|
|
4542
|
-
return
|
|
4543
|
-
matchReason:
|
|
4544
|
-
matchedTerms:
|
|
4545
|
-
semanticSimilarity:
|
|
4546
|
-
contributingFactors:
|
|
4413
|
+
import { z as z66 } from "zod";
|
|
4414
|
+
var explanation = z66.lazy(() => {
|
|
4415
|
+
return z66.object({
|
|
4416
|
+
matchReason: z66.string(),
|
|
4417
|
+
matchedTerms: z66.array(z66.string()).optional(),
|
|
4418
|
+
semanticSimilarity: z66.number().optional(),
|
|
4419
|
+
contributingFactors: z66.array(z66.string()).optional()
|
|
4547
4420
|
});
|
|
4548
4421
|
});
|
|
4549
|
-
var explanationResponse =
|
|
4550
|
-
return
|
|
4551
|
-
matchReason:
|
|
4552
|
-
matchedTerms:
|
|
4553
|
-
semanticSimilarity:
|
|
4554
|
-
contributingFactors:
|
|
4422
|
+
var explanationResponse = z66.lazy(() => {
|
|
4423
|
+
return z66.object({
|
|
4424
|
+
matchReason: z66.string(),
|
|
4425
|
+
matchedTerms: z66.array(z66.string()).optional(),
|
|
4426
|
+
semanticSimilarity: z66.number().optional(),
|
|
4427
|
+
contributingFactors: z66.array(z66.string()).optional()
|
|
4555
4428
|
}).transform((data) => ({
|
|
4556
4429
|
matchReason: data["matchReason"],
|
|
4557
4430
|
matchedTerms: data["matchedTerms"],
|
|
@@ -4559,12 +4432,12 @@ var explanationResponse = z67.lazy(() => {
|
|
|
4559
4432
|
contributingFactors: data["contributingFactors"]
|
|
4560
4433
|
}));
|
|
4561
4434
|
});
|
|
4562
|
-
var explanationRequest =
|
|
4563
|
-
return
|
|
4564
|
-
matchReason:
|
|
4565
|
-
matchedTerms:
|
|
4566
|
-
semanticSimilarity:
|
|
4567
|
-
contributingFactors:
|
|
4435
|
+
var explanationRequest = z66.lazy(() => {
|
|
4436
|
+
return z66.object({
|
|
4437
|
+
matchReason: z66.string(),
|
|
4438
|
+
matchedTerms: z66.array(z66.string()).optional(),
|
|
4439
|
+
semanticSimilarity: z66.number().optional(),
|
|
4440
|
+
contributingFactors: z66.array(z66.string()).optional()
|
|
4568
4441
|
}).transform((data) => ({
|
|
4569
4442
|
matchReason: data["matchReason"],
|
|
4570
4443
|
matchedTerms: data["matchedTerms"],
|
|
@@ -4574,33 +4447,33 @@ var explanationRequest = z67.lazy(() => {
|
|
|
4574
4447
|
});
|
|
4575
4448
|
|
|
4576
4449
|
// src/services/memories/models/search-result.ts
|
|
4577
|
-
var searchResult =
|
|
4578
|
-
return
|
|
4450
|
+
var searchResult = z67.lazy(() => {
|
|
4451
|
+
return z67.object({
|
|
4579
4452
|
memory: searchResultMemory,
|
|
4580
|
-
score:
|
|
4581
|
-
entities:
|
|
4582
|
-
topics:
|
|
4583
|
-
searchMethod:
|
|
4584
|
-
hybridScore:
|
|
4585
|
-
vectorScore:
|
|
4586
|
-
vectorRank:
|
|
4587
|
-
fulltextScore:
|
|
4588
|
-
fulltextRank:
|
|
4453
|
+
score: z67.number(),
|
|
4454
|
+
entities: z67.array(entity).optional(),
|
|
4455
|
+
topics: z67.array(topicReference).optional(),
|
|
4456
|
+
searchMethod: z67.string().optional(),
|
|
4457
|
+
hybridScore: z67.number().optional(),
|
|
4458
|
+
vectorScore: z67.number().optional(),
|
|
4459
|
+
vectorRank: z67.number().optional().nullable(),
|
|
4460
|
+
fulltextScore: z67.number().optional(),
|
|
4461
|
+
fulltextRank: z67.number().optional().nullable(),
|
|
4589
4462
|
explanation: explanation.optional()
|
|
4590
4463
|
});
|
|
4591
4464
|
});
|
|
4592
|
-
var searchResultResponse =
|
|
4593
|
-
return
|
|
4465
|
+
var searchResultResponse = z67.lazy(() => {
|
|
4466
|
+
return z67.object({
|
|
4594
4467
|
memory: searchResultMemoryResponse,
|
|
4595
|
-
score:
|
|
4596
|
-
entities:
|
|
4597
|
-
topics:
|
|
4598
|
-
searchMethod:
|
|
4599
|
-
hybridScore:
|
|
4600
|
-
vectorScore:
|
|
4601
|
-
vectorRank:
|
|
4602
|
-
fulltextScore:
|
|
4603
|
-
fulltextRank:
|
|
4468
|
+
score: z67.number(),
|
|
4469
|
+
entities: z67.array(entityResponse).optional(),
|
|
4470
|
+
topics: z67.array(topicReferenceResponse).optional(),
|
|
4471
|
+
searchMethod: z67.string().optional(),
|
|
4472
|
+
hybridScore: z67.number().optional(),
|
|
4473
|
+
vectorScore: z67.number().optional(),
|
|
4474
|
+
vectorRank: z67.number().optional().nullable(),
|
|
4475
|
+
fulltextScore: z67.number().optional(),
|
|
4476
|
+
fulltextRank: z67.number().optional().nullable(),
|
|
4604
4477
|
explanation: explanationResponse.optional()
|
|
4605
4478
|
}).transform((data) => ({
|
|
4606
4479
|
memory: data["memory"],
|
|
@@ -4616,18 +4489,18 @@ var searchResultResponse = z68.lazy(() => {
|
|
|
4616
4489
|
explanation: data["explanation"]
|
|
4617
4490
|
}));
|
|
4618
4491
|
});
|
|
4619
|
-
var searchResultRequest =
|
|
4620
|
-
return
|
|
4492
|
+
var searchResultRequest = z67.lazy(() => {
|
|
4493
|
+
return z67.object({
|
|
4621
4494
|
memory: searchResultMemoryRequest,
|
|
4622
|
-
score:
|
|
4623
|
-
entities:
|
|
4624
|
-
topics:
|
|
4625
|
-
searchMethod:
|
|
4626
|
-
hybridScore:
|
|
4627
|
-
vectorScore:
|
|
4628
|
-
vectorRank:
|
|
4629
|
-
fulltextScore:
|
|
4630
|
-
fulltextRank:
|
|
4495
|
+
score: z67.number(),
|
|
4496
|
+
entities: z67.array(entityRequest).optional(),
|
|
4497
|
+
topics: z67.array(topicReferenceRequest).optional(),
|
|
4498
|
+
searchMethod: z67.string().optional(),
|
|
4499
|
+
hybridScore: z67.number().optional(),
|
|
4500
|
+
vectorScore: z67.number().optional(),
|
|
4501
|
+
vectorRank: z67.number().optional().nullable(),
|
|
4502
|
+
fulltextScore: z67.number().optional(),
|
|
4503
|
+
fulltextRank: z67.number().optional().nullable(),
|
|
4631
4504
|
explanation: explanationRequest.optional()
|
|
4632
4505
|
}).transform((data) => ({
|
|
4633
4506
|
memory: data["memory"],
|
|
@@ -4645,30 +4518,30 @@ var searchResultRequest = z68.lazy(() => {
|
|
|
4645
4518
|
});
|
|
4646
4519
|
|
|
4647
4520
|
// src/services/memories/models/search-response-pagination.ts
|
|
4648
|
-
import { z as
|
|
4649
|
-
var searchResponsePagination =
|
|
4650
|
-
return
|
|
4651
|
-
limit:
|
|
4652
|
-
offset:
|
|
4653
|
-
count:
|
|
4521
|
+
import { z as z68 } from "zod";
|
|
4522
|
+
var searchResponsePagination = z68.lazy(() => {
|
|
4523
|
+
return z68.object({
|
|
4524
|
+
limit: z68.number().gte(1),
|
|
4525
|
+
offset: z68.number().gte(0),
|
|
4526
|
+
count: z68.number().gte(0)
|
|
4654
4527
|
});
|
|
4655
4528
|
});
|
|
4656
|
-
var searchResponsePaginationResponse =
|
|
4657
|
-
return
|
|
4658
|
-
limit:
|
|
4659
|
-
offset:
|
|
4660
|
-
count:
|
|
4529
|
+
var searchResponsePaginationResponse = z68.lazy(() => {
|
|
4530
|
+
return z68.object({
|
|
4531
|
+
limit: z68.number().gte(1),
|
|
4532
|
+
offset: z68.number().gte(0),
|
|
4533
|
+
count: z68.number().gte(0)
|
|
4661
4534
|
}).transform((data) => ({
|
|
4662
4535
|
limit: data["limit"],
|
|
4663
4536
|
offset: data["offset"],
|
|
4664
4537
|
count: data["count"]
|
|
4665
4538
|
}));
|
|
4666
4539
|
});
|
|
4667
|
-
var searchResponsePaginationRequest =
|
|
4668
|
-
return
|
|
4669
|
-
limit:
|
|
4670
|
-
offset:
|
|
4671
|
-
count:
|
|
4540
|
+
var searchResponsePaginationRequest = z68.lazy(() => {
|
|
4541
|
+
return z68.object({
|
|
4542
|
+
limit: z68.number().gte(1),
|
|
4543
|
+
offset: z68.number().gte(0),
|
|
4544
|
+
count: z68.number().gte(0)
|
|
4672
4545
|
}).transform((data) => ({
|
|
4673
4546
|
limit: data["limit"],
|
|
4674
4547
|
offset: data["offset"],
|
|
@@ -4677,29 +4550,29 @@ var searchResponsePaginationRequest = z69.lazy(() => {
|
|
|
4677
4550
|
});
|
|
4678
4551
|
|
|
4679
4552
|
// src/services/memories/models/temporal-metadata.ts
|
|
4680
|
-
import { z as
|
|
4553
|
+
import { z as z71 } from "zod";
|
|
4681
4554
|
|
|
4682
4555
|
// src/services/memories/models/event-time-range.ts
|
|
4683
|
-
import { z as
|
|
4684
|
-
var eventTimeRange =
|
|
4685
|
-
return
|
|
4686
|
-
from:
|
|
4687
|
-
to:
|
|
4556
|
+
import { z as z69 } from "zod";
|
|
4557
|
+
var eventTimeRange = z69.lazy(() => {
|
|
4558
|
+
return z69.object({
|
|
4559
|
+
from: z69.string().nullable(),
|
|
4560
|
+
to: z69.string().nullable()
|
|
4688
4561
|
});
|
|
4689
4562
|
});
|
|
4690
|
-
var eventTimeRangeResponse =
|
|
4691
|
-
return
|
|
4692
|
-
from:
|
|
4693
|
-
to:
|
|
4563
|
+
var eventTimeRangeResponse = z69.lazy(() => {
|
|
4564
|
+
return z69.object({
|
|
4565
|
+
from: z69.string().nullable(),
|
|
4566
|
+
to: z69.string().nullable()
|
|
4694
4567
|
}).transform((data) => ({
|
|
4695
4568
|
from: data["from"],
|
|
4696
4569
|
to: data["to"]
|
|
4697
4570
|
}));
|
|
4698
4571
|
});
|
|
4699
|
-
var eventTimeRangeRequest =
|
|
4700
|
-
return
|
|
4701
|
-
from:
|
|
4702
|
-
to:
|
|
4572
|
+
var eventTimeRangeRequest = z69.lazy(() => {
|
|
4573
|
+
return z69.object({
|
|
4574
|
+
from: z69.string().nullable(),
|
|
4575
|
+
to: z69.string().nullable()
|
|
4703
4576
|
}).transform((data) => ({
|
|
4704
4577
|
from: data["from"],
|
|
4705
4578
|
to: data["to"]
|
|
@@ -4707,26 +4580,26 @@ var eventTimeRangeRequest = z70.lazy(() => {
|
|
|
4707
4580
|
});
|
|
4708
4581
|
|
|
4709
4582
|
// src/services/memories/models/ingestion-time-range.ts
|
|
4710
|
-
import { z as
|
|
4711
|
-
var ingestionTimeRange =
|
|
4712
|
-
return
|
|
4713
|
-
from:
|
|
4714
|
-
to:
|
|
4583
|
+
import { z as z70 } from "zod";
|
|
4584
|
+
var ingestionTimeRange = z70.lazy(() => {
|
|
4585
|
+
return z70.object({
|
|
4586
|
+
from: z70.string().nullable(),
|
|
4587
|
+
to: z70.string().nullable()
|
|
4715
4588
|
});
|
|
4716
4589
|
});
|
|
4717
|
-
var ingestionTimeRangeResponse =
|
|
4718
|
-
return
|
|
4719
|
-
from:
|
|
4720
|
-
to:
|
|
4590
|
+
var ingestionTimeRangeResponse = z70.lazy(() => {
|
|
4591
|
+
return z70.object({
|
|
4592
|
+
from: z70.string().nullable(),
|
|
4593
|
+
to: z70.string().nullable()
|
|
4721
4594
|
}).transform((data) => ({
|
|
4722
4595
|
from: data["from"],
|
|
4723
4596
|
to: data["to"]
|
|
4724
4597
|
}));
|
|
4725
4598
|
});
|
|
4726
|
-
var ingestionTimeRangeRequest =
|
|
4727
|
-
return
|
|
4728
|
-
from:
|
|
4729
|
-
to:
|
|
4599
|
+
var ingestionTimeRangeRequest = z70.lazy(() => {
|
|
4600
|
+
return z70.object({
|
|
4601
|
+
from: z70.string().nullable(),
|
|
4602
|
+
to: z70.string().nullable()
|
|
4730
4603
|
}).transform((data) => ({
|
|
4731
4604
|
from: data["from"],
|
|
4732
4605
|
to: data["to"]
|
|
@@ -4734,26 +4607,26 @@ var ingestionTimeRangeRequest = z71.lazy(() => {
|
|
|
4734
4607
|
});
|
|
4735
4608
|
|
|
4736
4609
|
// src/services/memories/models/temporal-metadata.ts
|
|
4737
|
-
var temporalMetadata =
|
|
4738
|
-
return
|
|
4739
|
-
temporalMode:
|
|
4740
|
-
asOfTime:
|
|
4741
|
-
validAtTime:
|
|
4610
|
+
var temporalMetadata = z71.lazy(() => {
|
|
4611
|
+
return z71.object({
|
|
4612
|
+
temporalMode: z71.string(),
|
|
4613
|
+
asOfTime: z71.string().nullable(),
|
|
4614
|
+
validAtTime: z71.string().nullable(),
|
|
4742
4615
|
eventTimeRange: eventTimeRange.nullable(),
|
|
4743
4616
|
ingestionTimeRange: ingestionTimeRange.nullable(),
|
|
4744
|
-
includeExpired:
|
|
4745
|
-
temporalFieldsIncluded:
|
|
4617
|
+
includeExpired: z71.boolean(),
|
|
4618
|
+
temporalFieldsIncluded: z71.boolean()
|
|
4746
4619
|
});
|
|
4747
4620
|
});
|
|
4748
|
-
var temporalMetadataResponse =
|
|
4749
|
-
return
|
|
4750
|
-
temporalMode:
|
|
4751
|
-
asOfTime:
|
|
4752
|
-
validAtTime:
|
|
4621
|
+
var temporalMetadataResponse = z71.lazy(() => {
|
|
4622
|
+
return z71.object({
|
|
4623
|
+
temporalMode: z71.string(),
|
|
4624
|
+
asOfTime: z71.string().nullable(),
|
|
4625
|
+
validAtTime: z71.string().nullable(),
|
|
4753
4626
|
eventTimeRange: eventTimeRangeResponse.nullable(),
|
|
4754
4627
|
ingestionTimeRange: ingestionTimeRangeResponse.nullable(),
|
|
4755
|
-
includeExpired:
|
|
4756
|
-
temporalFieldsIncluded:
|
|
4628
|
+
includeExpired: z71.boolean(),
|
|
4629
|
+
temporalFieldsIncluded: z71.boolean()
|
|
4757
4630
|
}).transform((data) => ({
|
|
4758
4631
|
temporalMode: data["temporalMode"],
|
|
4759
4632
|
asOfTime: data["asOfTime"],
|
|
@@ -4764,15 +4637,15 @@ var temporalMetadataResponse = z72.lazy(() => {
|
|
|
4764
4637
|
temporalFieldsIncluded: data["temporalFieldsIncluded"]
|
|
4765
4638
|
}));
|
|
4766
4639
|
});
|
|
4767
|
-
var temporalMetadataRequest =
|
|
4768
|
-
return
|
|
4769
|
-
temporalMode:
|
|
4770
|
-
asOfTime:
|
|
4771
|
-
validAtTime:
|
|
4640
|
+
var temporalMetadataRequest = z71.lazy(() => {
|
|
4641
|
+
return z71.object({
|
|
4642
|
+
temporalMode: z71.string(),
|
|
4643
|
+
asOfTime: z71.string().nullable(),
|
|
4644
|
+
validAtTime: z71.string().nullable(),
|
|
4772
4645
|
eventTimeRange: eventTimeRangeRequest.nullable(),
|
|
4773
4646
|
ingestionTimeRange: ingestionTimeRangeRequest.nullable(),
|
|
4774
|
-
includeExpired:
|
|
4775
|
-
temporalFieldsIncluded:
|
|
4647
|
+
includeExpired: z71.boolean(),
|
|
4648
|
+
temporalFieldsIncluded: z71.boolean()
|
|
4776
4649
|
}).transform((data) => ({
|
|
4777
4650
|
temporalMode: data["temporalMode"],
|
|
4778
4651
|
asOfTime: data["asOfTime"],
|
|
@@ -4785,18 +4658,18 @@ var temporalMetadataRequest = z72.lazy(() => {
|
|
|
4785
4658
|
});
|
|
4786
4659
|
|
|
4787
4660
|
// src/services/memories/models/search-response.ts
|
|
4788
|
-
var searchResponse =
|
|
4789
|
-
return
|
|
4790
|
-
data:
|
|
4791
|
-
searchMethod:
|
|
4661
|
+
var searchResponse = z72.lazy(() => {
|
|
4662
|
+
return z72.object({
|
|
4663
|
+
data: z72.array(searchResult),
|
|
4664
|
+
searchMethod: z72.string().optional(),
|
|
4792
4665
|
pagination: searchResponsePagination,
|
|
4793
4666
|
temporalMetadata: temporalMetadata.nullable()
|
|
4794
4667
|
});
|
|
4795
4668
|
});
|
|
4796
|
-
var searchResponseResponse =
|
|
4797
|
-
return
|
|
4798
|
-
data:
|
|
4799
|
-
searchMethod:
|
|
4669
|
+
var searchResponseResponse = z72.lazy(() => {
|
|
4670
|
+
return z72.object({
|
|
4671
|
+
data: z72.array(searchResultResponse),
|
|
4672
|
+
searchMethod: z72.string().optional(),
|
|
4800
4673
|
pagination: searchResponsePaginationResponse,
|
|
4801
4674
|
temporalMetadata: temporalMetadataResponse.nullable()
|
|
4802
4675
|
}).transform((data) => ({
|
|
@@ -4806,10 +4679,10 @@ var searchResponseResponse = z73.lazy(() => {
|
|
|
4806
4679
|
temporalMetadata: data["temporalMetadata"]
|
|
4807
4680
|
}));
|
|
4808
4681
|
});
|
|
4809
|
-
var searchResponseRequest =
|
|
4810
|
-
return
|
|
4811
|
-
data:
|
|
4812
|
-
searchMethod:
|
|
4682
|
+
var searchResponseRequest = z72.lazy(() => {
|
|
4683
|
+
return z72.object({
|
|
4684
|
+
data: z72.array(searchResultRequest),
|
|
4685
|
+
searchMethod: z72.string().optional(),
|
|
4813
4686
|
pagination: searchResponsePaginationRequest,
|
|
4814
4687
|
temporalMetadata: temporalMetadataRequest.nullable()
|
|
4815
4688
|
}).transform((data) => ({
|
|
@@ -4820,6 +4693,133 @@ var searchResponseRequest = z73.lazy(() => {
|
|
|
4820
4693
|
}));
|
|
4821
4694
|
});
|
|
4822
4695
|
|
|
4696
|
+
// src/services/memories/models/search-request.ts
|
|
4697
|
+
import { z as z73 } from "zod";
|
|
4698
|
+
var searchRequest = z73.lazy(() => {
|
|
4699
|
+
return z73.object({
|
|
4700
|
+
query: z73.string().min(1),
|
|
4701
|
+
mode: z73.string().optional(),
|
|
4702
|
+
searchMethod: z73.string().optional(),
|
|
4703
|
+
limit: z73.number().gte(1).lte(100).optional(),
|
|
4704
|
+
offset: z73.number().gte(0).optional(),
|
|
4705
|
+
vectorWeight: z73.number().gte(0).lte(1).optional(),
|
|
4706
|
+
fulltextWeight: z73.number().gte(0).lte(1).optional(),
|
|
4707
|
+
threshold: z73.number().gte(0).lte(1).optional(),
|
|
4708
|
+
explain: z73.boolean().optional(),
|
|
4709
|
+
asOfTime: z73.string().optional(),
|
|
4710
|
+
validAtTime: z73.string().optional(),
|
|
4711
|
+
eventTimeFrom: z73.string().optional(),
|
|
4712
|
+
eventTimeTo: z73.string().optional(),
|
|
4713
|
+
ingestionTimeFrom: z73.string().optional(),
|
|
4714
|
+
ingestionTimeTo: z73.string().optional(),
|
|
4715
|
+
includeExpired: z73.boolean().optional(),
|
|
4716
|
+
temporalMode: z73.string().optional(),
|
|
4717
|
+
topics: z73.array(z73.string()).optional(),
|
|
4718
|
+
memoryType: z73.string().optional(),
|
|
4719
|
+
conversationId: z73.string().optional(),
|
|
4720
|
+
includeTopics: z73.boolean().optional(),
|
|
4721
|
+
includeEntities: z73.boolean().optional()
|
|
4722
|
+
});
|
|
4723
|
+
});
|
|
4724
|
+
var searchRequestResponse = z73.lazy(() => {
|
|
4725
|
+
return z73.object({
|
|
4726
|
+
query: z73.string().min(1),
|
|
4727
|
+
mode: z73.string().optional(),
|
|
4728
|
+
searchMethod: z73.string().optional(),
|
|
4729
|
+
limit: z73.number().gte(1).lte(100).optional(),
|
|
4730
|
+
offset: z73.number().gte(0).optional(),
|
|
4731
|
+
vectorWeight: z73.number().gte(0).lte(1).optional(),
|
|
4732
|
+
fulltextWeight: z73.number().gte(0).lte(1).optional(),
|
|
4733
|
+
threshold: z73.number().gte(0).lte(1).optional(),
|
|
4734
|
+
explain: z73.boolean().optional(),
|
|
4735
|
+
asOfTime: z73.string().optional(),
|
|
4736
|
+
validAtTime: z73.string().optional(),
|
|
4737
|
+
eventTimeFrom: z73.string().optional(),
|
|
4738
|
+
eventTimeTo: z73.string().optional(),
|
|
4739
|
+
ingestionTimeFrom: z73.string().optional(),
|
|
4740
|
+
ingestionTimeTo: z73.string().optional(),
|
|
4741
|
+
includeExpired: z73.boolean().optional(),
|
|
4742
|
+
temporalMode: z73.string().optional(),
|
|
4743
|
+
topics: z73.array(z73.string()).optional(),
|
|
4744
|
+
memoryType: z73.string().optional(),
|
|
4745
|
+
conversationId: z73.string().optional(),
|
|
4746
|
+
includeTopics: z73.boolean().optional(),
|
|
4747
|
+
includeEntities: z73.boolean().optional()
|
|
4748
|
+
}).transform((data) => ({
|
|
4749
|
+
query: data["query"],
|
|
4750
|
+
mode: data["mode"],
|
|
4751
|
+
searchMethod: data["searchMethod"],
|
|
4752
|
+
limit: data["limit"],
|
|
4753
|
+
offset: data["offset"],
|
|
4754
|
+
vectorWeight: data["vectorWeight"],
|
|
4755
|
+
fulltextWeight: data["fulltextWeight"],
|
|
4756
|
+
threshold: data["threshold"],
|
|
4757
|
+
explain: data["explain"],
|
|
4758
|
+
asOfTime: data["asOfTime"],
|
|
4759
|
+
validAtTime: data["validAtTime"],
|
|
4760
|
+
eventTimeFrom: data["eventTimeFrom"],
|
|
4761
|
+
eventTimeTo: data["eventTimeTo"],
|
|
4762
|
+
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4763
|
+
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4764
|
+
includeExpired: data["includeExpired"],
|
|
4765
|
+
temporalMode: data["temporalMode"],
|
|
4766
|
+
topics: data["topics"],
|
|
4767
|
+
memoryType: data["memoryType"],
|
|
4768
|
+
conversationId: data["conversationId"],
|
|
4769
|
+
includeTopics: data["includeTopics"],
|
|
4770
|
+
includeEntities: data["includeEntities"]
|
|
4771
|
+
}));
|
|
4772
|
+
});
|
|
4773
|
+
var searchRequestRequest = z73.lazy(() => {
|
|
4774
|
+
return z73.object({
|
|
4775
|
+
query: z73.string().min(1),
|
|
4776
|
+
mode: z73.string().optional(),
|
|
4777
|
+
searchMethod: z73.string().optional(),
|
|
4778
|
+
limit: z73.number().gte(1).lte(100).optional(),
|
|
4779
|
+
offset: z73.number().gte(0).optional(),
|
|
4780
|
+
vectorWeight: z73.number().gte(0).lte(1).optional(),
|
|
4781
|
+
fulltextWeight: z73.number().gte(0).lte(1).optional(),
|
|
4782
|
+
threshold: z73.number().gte(0).lte(1).optional(),
|
|
4783
|
+
explain: z73.boolean().optional(),
|
|
4784
|
+
asOfTime: z73.string().optional(),
|
|
4785
|
+
validAtTime: z73.string().optional(),
|
|
4786
|
+
eventTimeFrom: z73.string().optional(),
|
|
4787
|
+
eventTimeTo: z73.string().optional(),
|
|
4788
|
+
ingestionTimeFrom: z73.string().optional(),
|
|
4789
|
+
ingestionTimeTo: z73.string().optional(),
|
|
4790
|
+
includeExpired: z73.boolean().optional(),
|
|
4791
|
+
temporalMode: z73.string().optional(),
|
|
4792
|
+
topics: z73.array(z73.string()).optional(),
|
|
4793
|
+
memoryType: z73.string().optional(),
|
|
4794
|
+
conversationId: z73.string().optional(),
|
|
4795
|
+
includeTopics: z73.boolean().optional(),
|
|
4796
|
+
includeEntities: z73.boolean().optional()
|
|
4797
|
+
}).transform((data) => ({
|
|
4798
|
+
query: data["query"],
|
|
4799
|
+
mode: data["mode"],
|
|
4800
|
+
searchMethod: data["searchMethod"],
|
|
4801
|
+
limit: data["limit"],
|
|
4802
|
+
offset: data["offset"],
|
|
4803
|
+
vectorWeight: data["vectorWeight"],
|
|
4804
|
+
fulltextWeight: data["fulltextWeight"],
|
|
4805
|
+
threshold: data["threshold"],
|
|
4806
|
+
explain: data["explain"],
|
|
4807
|
+
asOfTime: data["asOfTime"],
|
|
4808
|
+
validAtTime: data["validAtTime"],
|
|
4809
|
+
eventTimeFrom: data["eventTimeFrom"],
|
|
4810
|
+
eventTimeTo: data["eventTimeTo"],
|
|
4811
|
+
ingestionTimeFrom: data["ingestionTimeFrom"],
|
|
4812
|
+
ingestionTimeTo: data["ingestionTimeTo"],
|
|
4813
|
+
includeExpired: data["includeExpired"],
|
|
4814
|
+
temporalMode: data["temporalMode"],
|
|
4815
|
+
topics: data["topics"],
|
|
4816
|
+
memoryType: data["memoryType"],
|
|
4817
|
+
conversationId: data["conversationId"],
|
|
4818
|
+
includeTopics: data["includeTopics"],
|
|
4819
|
+
includeEntities: data["includeEntities"]
|
|
4820
|
+
}));
|
|
4821
|
+
});
|
|
4822
|
+
|
|
4823
4823
|
// src/services/memories/models/get-similar-memories-ok-response.ts
|
|
4824
4824
|
import { z as z76 } from "zod";
|
|
4825
4825
|
|
|
@@ -5210,7 +5210,15 @@ var MemoriesService = class extends BaseService {
|
|
|
5210
5210
|
return this.client.call(request);
|
|
5211
5211
|
}
|
|
5212
5212
|
/**
|
|
5213
|
-
* List all memories for the authenticated user with pagination
|
|
5213
|
+
* List all memories for the authenticated user with pagination.
|
|
5214
|
+
**ID Prefix Search:**
|
|
5215
|
+
Use the `idPrefix` parameter for git-style short ID lookup. This enables efficient
|
|
5216
|
+
server-side filtering instead of fetching all memories and filtering client-side.
|
|
5217
|
+
- Minimum 6 characters required for `idPrefix`
|
|
5218
|
+
- Returns matching memories directly (no need for secondary fetch)
|
|
5219
|
+
- Example: `?idPrefix=2d09116a` finds memories starting with that prefix
|
|
5220
|
+
|
|
5221
|
+
* @param {string} [params.idPrefix] - Filter memories by ID prefix (git-style short ID lookup). Minimum 6 characters.
|
|
5214
5222
|
* @param {number} [params.limit] - Maximum number of memories to return
|
|
5215
5223
|
* @param {number} [params.offset] - Number of memories to skip
|
|
5216
5224
|
* @param {number} [params.page] - Page number (alternative to offset)
|
|
@@ -5235,6 +5243,9 @@ var MemoriesService = class extends BaseService {
|
|
|
5235
5243
|
contentType: "json" /* Json */,
|
|
5236
5244
|
status: 500
|
|
5237
5245
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
|
5246
|
+
key: "idPrefix",
|
|
5247
|
+
value: params == null ? void 0 : params.idPrefix
|
|
5248
|
+
}).addQueryParam({
|
|
5238
5249
|
key: "limit",
|
|
5239
5250
|
value: params == null ? void 0 : params.limit
|
|
5240
5251
|
}).addQueryParam({
|
|
@@ -5292,6 +5303,137 @@ var MemoriesService = class extends BaseService {
|
|
|
5292
5303
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
5293
5304
|
return this.client.call(request);
|
|
5294
5305
|
}
|
|
5306
|
+
/**
|
|
5307
|
+
* Search memories using query parameters. Provides the same functionality asPOST /api/memories/search but accepts parameters via query string.
|
|
5308
|
+
|
|
5309
|
+
**Benefits of GET:**
|
|
5310
|
+
- Faster response times (~3x improvement)
|
|
5311
|
+
- Browser/CDN caching support
|
|
5312
|
+
- Simpler integration for read-only clients
|
|
5313
|
+
|
|
5314
|
+
**Search Methods:**
|
|
5315
|
+
- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
5316
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
5317
|
+
- **keyword**: Traditional fulltext search using Lucene
|
|
5318
|
+
|
|
5319
|
+
**Array Parameters:**
|
|
5320
|
+
- `topics`: Provide as comma-separated values (e.g., `topics=typescript,api-design`)
|
|
5321
|
+
|
|
5322
|
+
* @param {string} params.q - Search query string
|
|
5323
|
+
* @param {SearchMemoriesGetSearchMethod} [params.searchMethod] - Search algorithm to use
|
|
5324
|
+
* @param {number} [params.limit] - Maximum number of results to return
|
|
5325
|
+
* @param {number} [params.offset] - Number of results to skip for pagination
|
|
5326
|
+
* @param {number} [params.threshold] - Minimum similarity threshold for semantic search
|
|
5327
|
+
* @param {SearchMemoriesGetMode} [params.mode] - Content filtering mode
|
|
5328
|
+
* @param {number} [params.vectorWeight] - Weight for vector similarity in hybrid search
|
|
5329
|
+
* @param {number} [params.fulltextWeight] - Weight for fulltext matching in hybrid search
|
|
5330
|
+
* @param {string} [params.topics] - Comma-separated list of topics to filter by
|
|
5331
|
+
* @param {SearchMemoriesGetMemoryType} [params.memoryType] - Filter by memory type
|
|
5332
|
+
* @param {string} [params.conversationId] - Filter by conversation ID
|
|
5333
|
+
* @param {boolean} [params.explain] - Include detailed match explanations in results
|
|
5334
|
+
* @param {boolean} [params.includeTopics] - Include associated topics in results
|
|
5335
|
+
* @param {boolean} [params.includeEntities] - Include mentioned entities in results
|
|
5336
|
+
* @param {string} [params.asOfTime] - Point-in-time query (ISO 8601 datetime)
|
|
5337
|
+
* @param {string} [params.validAtTime] - Filter by validity time (ISO 8601 datetime)
|
|
5338
|
+
* @param {string} [params.eventTimeFrom] - Event time range start (ISO 8601 datetime)
|
|
5339
|
+
* @param {string} [params.eventTimeTo] - Event time range end (ISO 8601 datetime)
|
|
5340
|
+
* @param {string} [params.ingestionTimeFrom] - Ingestion time range start (ISO 8601 datetime)
|
|
5341
|
+
* @param {string} [params.ingestionTimeTo] - Ingestion time range end (ISO 8601 datetime)
|
|
5342
|
+
* @param {boolean} [params.includeExpired] - Include expired memories in results
|
|
5343
|
+
* @param {SearchMemoriesGetTemporalMode} [params.temporalMode] - Temporal query mode
|
|
5344
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
5345
|
+
* @returns {Promise<HttpResponse<SearchResponse>>} - Search results
|
|
5346
|
+
*/
|
|
5347
|
+
async searchMemoriesGet(params, requestConfig) {
|
|
5348
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "http://localhost:3000" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/api/memories/search").setRequestSchema(z81.any()).addAccessTokenAuth(this.config.token).setRequestContentType("json" /* Json */).addResponse({
|
|
5349
|
+
schema: searchResponseResponse,
|
|
5350
|
+
contentType: "json" /* Json */,
|
|
5351
|
+
status: 200
|
|
5352
|
+
}).addError({
|
|
5353
|
+
error: Error2,
|
|
5354
|
+
contentType: "json" /* Json */,
|
|
5355
|
+
status: 400
|
|
5356
|
+
}).addError({
|
|
5357
|
+
error: Error2,
|
|
5358
|
+
contentType: "json" /* Json */,
|
|
5359
|
+
status: 401
|
|
5360
|
+
}).addError({
|
|
5361
|
+
error: Error2,
|
|
5362
|
+
contentType: "json" /* Json */,
|
|
5363
|
+
status: 422
|
|
5364
|
+
}).addError({
|
|
5365
|
+
error: Error2,
|
|
5366
|
+
contentType: "json" /* Json */,
|
|
5367
|
+
status: 500
|
|
5368
|
+
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
|
5369
|
+
key: "q",
|
|
5370
|
+
value: params == null ? void 0 : params.q
|
|
5371
|
+
}).addQueryParam({
|
|
5372
|
+
key: "searchMethod",
|
|
5373
|
+
value: params == null ? void 0 : params.searchMethod
|
|
5374
|
+
}).addQueryParam({
|
|
5375
|
+
key: "limit",
|
|
5376
|
+
value: params == null ? void 0 : params.limit
|
|
5377
|
+
}).addQueryParam({
|
|
5378
|
+
key: "offset",
|
|
5379
|
+
value: params == null ? void 0 : params.offset
|
|
5380
|
+
}).addQueryParam({
|
|
5381
|
+
key: "threshold",
|
|
5382
|
+
value: params == null ? void 0 : params.threshold
|
|
5383
|
+
}).addQueryParam({
|
|
5384
|
+
key: "mode",
|
|
5385
|
+
value: params == null ? void 0 : params.mode
|
|
5386
|
+
}).addQueryParam({
|
|
5387
|
+
key: "vectorWeight",
|
|
5388
|
+
value: params == null ? void 0 : params.vectorWeight
|
|
5389
|
+
}).addQueryParam({
|
|
5390
|
+
key: "fulltextWeight",
|
|
5391
|
+
value: params == null ? void 0 : params.fulltextWeight
|
|
5392
|
+
}).addQueryParam({
|
|
5393
|
+
key: "topics",
|
|
5394
|
+
value: params == null ? void 0 : params.topics
|
|
5395
|
+
}).addQueryParam({
|
|
5396
|
+
key: "memoryType",
|
|
5397
|
+
value: params == null ? void 0 : params.memoryType
|
|
5398
|
+
}).addQueryParam({
|
|
5399
|
+
key: "conversationId",
|
|
5400
|
+
value: params == null ? void 0 : params.conversationId
|
|
5401
|
+
}).addQueryParam({
|
|
5402
|
+
key: "explain",
|
|
5403
|
+
value: params == null ? void 0 : params.explain
|
|
5404
|
+
}).addQueryParam({
|
|
5405
|
+
key: "includeTopics",
|
|
5406
|
+
value: params == null ? void 0 : params.includeTopics
|
|
5407
|
+
}).addQueryParam({
|
|
5408
|
+
key: "includeEntities",
|
|
5409
|
+
value: params == null ? void 0 : params.includeEntities
|
|
5410
|
+
}).addQueryParam({
|
|
5411
|
+
key: "asOfTime",
|
|
5412
|
+
value: params == null ? void 0 : params.asOfTime
|
|
5413
|
+
}).addQueryParam({
|
|
5414
|
+
key: "validAtTime",
|
|
5415
|
+
value: params == null ? void 0 : params.validAtTime
|
|
5416
|
+
}).addQueryParam({
|
|
5417
|
+
key: "eventTimeFrom",
|
|
5418
|
+
value: params == null ? void 0 : params.eventTimeFrom
|
|
5419
|
+
}).addQueryParam({
|
|
5420
|
+
key: "eventTimeTo",
|
|
5421
|
+
value: params == null ? void 0 : params.eventTimeTo
|
|
5422
|
+
}).addQueryParam({
|
|
5423
|
+
key: "ingestionTimeFrom",
|
|
5424
|
+
value: params == null ? void 0 : params.ingestionTimeFrom
|
|
5425
|
+
}).addQueryParam({
|
|
5426
|
+
key: "ingestionTimeTo",
|
|
5427
|
+
value: params == null ? void 0 : params.ingestionTimeTo
|
|
5428
|
+
}).addQueryParam({
|
|
5429
|
+
key: "includeExpired",
|
|
5430
|
+
value: params == null ? void 0 : params.includeExpired
|
|
5431
|
+
}).addQueryParam({
|
|
5432
|
+
key: "temporalMode",
|
|
5433
|
+
value: params == null ? void 0 : params.temporalMode
|
|
5434
|
+
}).build();
|
|
5435
|
+
return this.client.call(request);
|
|
5436
|
+
}
|
|
5295
5437
|
/**
|
|
5296
5438
|
* Search memories using different search methods:- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
5297
5439
|
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
@@ -5471,29 +5613,61 @@ var MemoryMemoryType2 = /* @__PURE__ */ ((MemoryMemoryType22) => {
|
|
|
5471
5613
|
return MemoryMemoryType22;
|
|
5472
5614
|
})(MemoryMemoryType2 || {});
|
|
5473
5615
|
|
|
5474
|
-
// src/services/memories/models/
|
|
5475
|
-
var
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
return
|
|
5480
|
-
})(
|
|
5481
|
-
|
|
5482
|
-
// src/services/memories/models/search-
|
|
5483
|
-
var
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
return
|
|
5488
|
-
})(
|
|
5489
|
-
|
|
5490
|
-
// src/services/memories/models/
|
|
5491
|
-
var
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
return
|
|
5496
|
-
})(
|
|
5616
|
+
// src/services/memories/models/search-memories-get-search-method.ts
|
|
5617
|
+
var SearchMemoriesGetSearchMethod = /* @__PURE__ */ ((SearchMemoriesGetSearchMethod2) => {
|
|
5618
|
+
SearchMemoriesGetSearchMethod2["KEYWORD"] = "keyword";
|
|
5619
|
+
SearchMemoriesGetSearchMethod2["SEMANTIC"] = "semantic";
|
|
5620
|
+
SearchMemoriesGetSearchMethod2["HYBRID"] = "hybrid";
|
|
5621
|
+
return SearchMemoriesGetSearchMethod2;
|
|
5622
|
+
})(SearchMemoriesGetSearchMethod || {});
|
|
5623
|
+
|
|
5624
|
+
// src/services/memories/models/search-memories-get-mode.ts
|
|
5625
|
+
var SearchMemoriesGetMode = /* @__PURE__ */ ((SearchMemoriesGetMode2) => {
|
|
5626
|
+
SearchMemoriesGetMode2["UNIFIED"] = "unified";
|
|
5627
|
+
SearchMemoriesGetMode2["CONTENT"] = "content";
|
|
5628
|
+
SearchMemoriesGetMode2["FACTS"] = "facts";
|
|
5629
|
+
return SearchMemoriesGetMode2;
|
|
5630
|
+
})(SearchMemoriesGetMode || {});
|
|
5631
|
+
|
|
5632
|
+
// src/services/memories/models/search-memories-get-memory-type.ts
|
|
5633
|
+
var SearchMemoriesGetMemoryType = /* @__PURE__ */ ((SearchMemoriesGetMemoryType2) => {
|
|
5634
|
+
SearchMemoriesGetMemoryType2["EPISODIC"] = "episodic";
|
|
5635
|
+
SearchMemoriesGetMemoryType2["SEMANTIC"] = "semantic";
|
|
5636
|
+
SearchMemoriesGetMemoryType2["PROCEDURAL"] = "procedural";
|
|
5637
|
+
return SearchMemoriesGetMemoryType2;
|
|
5638
|
+
})(SearchMemoriesGetMemoryType || {});
|
|
5639
|
+
|
|
5640
|
+
// src/services/memories/models/search-memories-get-temporal-mode.ts
|
|
5641
|
+
var SearchMemoriesGetTemporalMode = /* @__PURE__ */ ((SearchMemoriesGetTemporalMode2) => {
|
|
5642
|
+
SearchMemoriesGetTemporalMode2["CURRENT"] = "current";
|
|
5643
|
+
SearchMemoriesGetTemporalMode2["HISTORICAL"] = "historical";
|
|
5644
|
+
SearchMemoriesGetTemporalMode2["EVOLUTION"] = "evolution";
|
|
5645
|
+
return SearchMemoriesGetTemporalMode2;
|
|
5646
|
+
})(SearchMemoriesGetTemporalMode || {});
|
|
5647
|
+
|
|
5648
|
+
// src/services/memories/models/search-request-mode.ts
|
|
5649
|
+
var SearchRequestMode = /* @__PURE__ */ ((SearchRequestMode2) => {
|
|
5650
|
+
SearchRequestMode2["UNIFIED"] = "unified";
|
|
5651
|
+
SearchRequestMode2["CONTENT"] = "content";
|
|
5652
|
+
SearchRequestMode2["FACTS"] = "facts";
|
|
5653
|
+
return SearchRequestMode2;
|
|
5654
|
+
})(SearchRequestMode || {});
|
|
5655
|
+
|
|
5656
|
+
// src/services/memories/models/search-request-search-method.ts
|
|
5657
|
+
var SearchRequestSearchMethod = /* @__PURE__ */ ((SearchRequestSearchMethod2) => {
|
|
5658
|
+
SearchRequestSearchMethod2["KEYWORD"] = "keyword";
|
|
5659
|
+
SearchRequestSearchMethod2["SEMANTIC"] = "semantic";
|
|
5660
|
+
SearchRequestSearchMethod2["HYBRID"] = "hybrid";
|
|
5661
|
+
return SearchRequestSearchMethod2;
|
|
5662
|
+
})(SearchRequestSearchMethod || {});
|
|
5663
|
+
|
|
5664
|
+
// src/services/memories/models/search-request-temporal-mode.ts
|
|
5665
|
+
var SearchRequestTemporalMode = /* @__PURE__ */ ((SearchRequestTemporalMode2) => {
|
|
5666
|
+
SearchRequestTemporalMode2["CURRENT"] = "current";
|
|
5667
|
+
SearchRequestTemporalMode2["HISTORICAL"] = "historical";
|
|
5668
|
+
SearchRequestTemporalMode2["EVOLUTION"] = "evolution";
|
|
5669
|
+
return SearchRequestTemporalMode2;
|
|
5670
|
+
})(SearchRequestTemporalMode || {});
|
|
5497
5671
|
|
|
5498
5672
|
// src/services/memories/models/search-request-memory-type.ts
|
|
5499
5673
|
var SearchRequestMemoryType = /* @__PURE__ */ ((SearchRequestMemoryType2) => {
|
|
@@ -7860,15 +8034,19 @@ export {
|
|
|
7860
8034
|
MemoryMemoryType2,
|
|
7861
8035
|
MemoryMemoryType3,
|
|
7862
8036
|
MemoryMemoryType4,
|
|
7863
|
-
Mode,
|
|
7864
8037
|
NoCache,
|
|
7865
8038
|
PatternsService,
|
|
7866
8039
|
Role,
|
|
7867
|
-
|
|
8040
|
+
SearchMemoriesGetMemoryType,
|
|
8041
|
+
SearchMemoriesGetMode,
|
|
8042
|
+
SearchMemoriesGetSearchMethod,
|
|
8043
|
+
SearchMemoriesGetTemporalMode,
|
|
7868
8044
|
SearchRequestMemoryType,
|
|
8045
|
+
SearchRequestMode,
|
|
8046
|
+
SearchRequestSearchMethod,
|
|
8047
|
+
SearchRequestTemporalMode,
|
|
7869
8048
|
ServiceCheckStatus,
|
|
7870
8049
|
SystemService,
|
|
7871
|
-
TemporalMode,
|
|
7872
8050
|
TopicsService,
|
|
7873
8051
|
UpdateMemoryRequestMemoryType
|
|
7874
8052
|
};
|