@memnexus-ai/typescript-sdk 1.1.6 → 1.2.1
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 +1 -1
- package/dist/index.d.ts +243 -55
- package/dist/index.js +716 -598
- package/dist/index.mjs +715 -598
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
156
156
|
| [SearchResult](documentation/models/SearchResult.md) | |
|
|
157
157
|
| [Entity](documentation/models/Entity.md) | |
|
|
158
158
|
| [Topic](documentation/models/Topic.md) | |
|
|
159
|
-
| [TemporalMetadata](documentation/models/TemporalMetadata.md) | Temporal query metadata
|
|
159
|
+
| [TemporalMetadata](documentation/models/TemporalMetadata.md) | Temporal query metadata (null for semantic/hybrid search) |
|
|
160
160
|
| [NoCache](documentation/models/NoCache.md) | |
|
|
161
161
|
| [Error](documentation/models/Error.md) | |
|
|
162
162
|
| [EvaluateFeatureFlagRequest](documentation/models/EvaluateFeatureFlagRequest.md) | |
|
package/dist/index.d.ts
CHANGED
|
@@ -3115,8 +3115,13 @@ type CreateMemoryResponse = z.infer<typeof createMemoryResponse>;
|
|
|
3115
3115
|
declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
3116
3116
|
query: z.ZodString;
|
|
3117
3117
|
mode: z.ZodOptional<z.ZodString>;
|
|
3118
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
3118
3119
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
3119
3120
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
3121
|
+
vectorWeight: z.ZodOptional<z.ZodNumber>;
|
|
3122
|
+
fulltextWeight: z.ZodOptional<z.ZodNumber>;
|
|
3123
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
3124
|
+
explain: z.ZodOptional<z.ZodBoolean>;
|
|
3120
3125
|
asOfTime: z.ZodOptional<z.ZodString>;
|
|
3121
3126
|
validAtTime: z.ZodOptional<z.ZodString>;
|
|
3122
3127
|
eventTimeFrom: z.ZodOptional<z.ZodString>;
|
|
@@ -3128,8 +3133,13 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3128
3133
|
}, "strip", z.ZodTypeAny, {
|
|
3129
3134
|
query: string;
|
|
3130
3135
|
mode?: string | undefined;
|
|
3136
|
+
searchMethod?: string | undefined;
|
|
3131
3137
|
limit?: number | undefined;
|
|
3132
3138
|
offset?: number | undefined;
|
|
3139
|
+
vectorWeight?: number | undefined;
|
|
3140
|
+
fulltextWeight?: number | undefined;
|
|
3141
|
+
threshold?: number | undefined;
|
|
3142
|
+
explain?: boolean | undefined;
|
|
3133
3143
|
asOfTime?: string | undefined;
|
|
3134
3144
|
validAtTime?: string | undefined;
|
|
3135
3145
|
eventTimeFrom?: string | undefined;
|
|
@@ -3141,8 +3151,13 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3141
3151
|
}, {
|
|
3142
3152
|
query: string;
|
|
3143
3153
|
mode?: string | undefined;
|
|
3154
|
+
searchMethod?: string | undefined;
|
|
3144
3155
|
limit?: number | undefined;
|
|
3145
3156
|
offset?: number | undefined;
|
|
3157
|
+
vectorWeight?: number | undefined;
|
|
3158
|
+
fulltextWeight?: number | undefined;
|
|
3159
|
+
threshold?: number | undefined;
|
|
3160
|
+
explain?: boolean | undefined;
|
|
3146
3161
|
asOfTime?: string | undefined;
|
|
3147
3162
|
validAtTime?: string | undefined;
|
|
3148
3163
|
eventTimeFrom?: string | undefined;
|
|
@@ -3156,9 +3171,14 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3156
3171
|
*
|
|
3157
3172
|
* @typedef {SearchRequest} searchRequest
|
|
3158
3173
|
* @property {string} - Search query
|
|
3159
|
-
* @property {Mode} -
|
|
3174
|
+
* @property {Mode} - Content filtering mode (defaults to unified)
|
|
3175
|
+
* @property {SearchMethod} - Search algorithm: keyword (fulltext), semantic (vector), or hybrid (combined). Defaults to keyword.
|
|
3160
3176
|
* @property {number} - Maximum number of results (defaults to 20)
|
|
3161
3177
|
* @property {number} - Offset for pagination (defaults to 0)
|
|
3178
|
+
* @property {number} - Weight for vector (semantic) results in hybrid search (0-1, defaults to 0.7)
|
|
3179
|
+
* @property {number} - Weight for fulltext (keyword) results in hybrid search (0-1, defaults to 0.3)
|
|
3180
|
+
* @property {number} - Minimum similarity threshold for semantic search (0-1, defaults to 0.5)
|
|
3181
|
+
* @property {boolean} - If true, include detailed explanation of how each result was matched
|
|
3162
3182
|
* @property {string} - Point-in-time query: show what the system knew at this time (ISO 8601 format)
|
|
3163
3183
|
* @property {string} - Validity query: show facts that were valid at this time (ISO 8601 format)
|
|
3164
3184
|
* @property {string} - Event time range start (ISO 8601 format)
|
|
@@ -3213,7 +3233,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3213
3233
|
validTo?: string | null | undefined;
|
|
3214
3234
|
}>>;
|
|
3215
3235
|
score: z.ZodNumber;
|
|
3216
|
-
entities: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3236
|
+
entities: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3217
3237
|
name: z.ZodOptional<z.ZodString>;
|
|
3218
3238
|
type: z.ZodOptional<z.ZodString>;
|
|
3219
3239
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3222,8 +3242,8 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3222
3242
|
}, {
|
|
3223
3243
|
name?: string | undefined;
|
|
3224
3244
|
type?: string | undefined;
|
|
3225
|
-
}>>, "many"
|
|
3226
|
-
topics: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3245
|
+
}>>, "many">>;
|
|
3246
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3227
3247
|
name: z.ZodString;
|
|
3228
3248
|
count: z.ZodNumber;
|
|
3229
3249
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3232,12 +3252,30 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3232
3252
|
}, {
|
|
3233
3253
|
name: string;
|
|
3234
3254
|
count: number;
|
|
3235
|
-
}>>, "many"
|
|
3255
|
+
}>>, "many">>;
|
|
3256
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
3257
|
+
hybridScore: z.ZodOptional<z.ZodNumber>;
|
|
3258
|
+
vectorScore: z.ZodOptional<z.ZodNumber>;
|
|
3259
|
+
vectorRank: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
3260
|
+
fulltextScore: z.ZodOptional<z.ZodNumber>;
|
|
3261
|
+
fulltextRank: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
3262
|
+
explanation: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
3263
|
+
matchReason: z.ZodString;
|
|
3264
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3265
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
3266
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3267
|
+
}, "strip", z.ZodTypeAny, {
|
|
3268
|
+
matchReason: string;
|
|
3269
|
+
matchedTerms?: string[] | undefined;
|
|
3270
|
+
semanticSimilarity?: number | undefined;
|
|
3271
|
+
contributingFactors?: string[] | undefined;
|
|
3272
|
+
}, {
|
|
3273
|
+
matchReason: string;
|
|
3274
|
+
matchedTerms?: string[] | undefined;
|
|
3275
|
+
semanticSimilarity?: number | undefined;
|
|
3276
|
+
contributingFactors?: string[] | undefined;
|
|
3277
|
+
}>>>;
|
|
3236
3278
|
}, "strip", z.ZodTypeAny, {
|
|
3237
|
-
topics: {
|
|
3238
|
-
name: string;
|
|
3239
|
-
count: number;
|
|
3240
|
-
}[];
|
|
3241
3279
|
memory: {
|
|
3242
3280
|
id: string;
|
|
3243
3281
|
createdAt: string;
|
|
@@ -3252,15 +3290,27 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3252
3290
|
validTo?: string | null | undefined;
|
|
3253
3291
|
};
|
|
3254
3292
|
score: number;
|
|
3255
|
-
entities
|
|
3293
|
+
entities?: {
|
|
3256
3294
|
name?: string | undefined;
|
|
3257
3295
|
type?: string | undefined;
|
|
3258
|
-
}[];
|
|
3259
|
-
|
|
3260
|
-
topics: {
|
|
3296
|
+
}[] | undefined;
|
|
3297
|
+
topics?: {
|
|
3261
3298
|
name: string;
|
|
3262
3299
|
count: number;
|
|
3263
|
-
}[];
|
|
3300
|
+
}[] | undefined;
|
|
3301
|
+
searchMethod?: string | undefined;
|
|
3302
|
+
hybridScore?: number | undefined;
|
|
3303
|
+
vectorScore?: number | undefined;
|
|
3304
|
+
vectorRank?: number | null | undefined;
|
|
3305
|
+
fulltextScore?: number | undefined;
|
|
3306
|
+
fulltextRank?: number | null | undefined;
|
|
3307
|
+
explanation?: {
|
|
3308
|
+
matchReason: string;
|
|
3309
|
+
matchedTerms?: string[] | undefined;
|
|
3310
|
+
semanticSimilarity?: number | undefined;
|
|
3311
|
+
contributingFactors?: string[] | undefined;
|
|
3312
|
+
} | undefined;
|
|
3313
|
+
}, {
|
|
3264
3314
|
memory: {
|
|
3265
3315
|
id: string;
|
|
3266
3316
|
createdAt: string;
|
|
@@ -3275,11 +3325,28 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3275
3325
|
validTo?: string | null | undefined;
|
|
3276
3326
|
};
|
|
3277
3327
|
score: number;
|
|
3278
|
-
entities
|
|
3328
|
+
entities?: {
|
|
3279
3329
|
name?: string | undefined;
|
|
3280
3330
|
type?: string | undefined;
|
|
3281
|
-
}[];
|
|
3331
|
+
}[] | undefined;
|
|
3332
|
+
topics?: {
|
|
3333
|
+
name: string;
|
|
3334
|
+
count: number;
|
|
3335
|
+
}[] | undefined;
|
|
3336
|
+
searchMethod?: string | undefined;
|
|
3337
|
+
hybridScore?: number | undefined;
|
|
3338
|
+
vectorScore?: number | undefined;
|
|
3339
|
+
vectorRank?: number | null | undefined;
|
|
3340
|
+
fulltextScore?: number | undefined;
|
|
3341
|
+
fulltextRank?: number | null | undefined;
|
|
3342
|
+
explanation?: {
|
|
3343
|
+
matchReason: string;
|
|
3344
|
+
matchedTerms?: string[] | undefined;
|
|
3345
|
+
semanticSimilarity?: number | undefined;
|
|
3346
|
+
contributingFactors?: string[] | undefined;
|
|
3347
|
+
} | undefined;
|
|
3282
3348
|
}>>, "many">;
|
|
3349
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
3283
3350
|
pagination: z.ZodLazy<z.ZodObject<{
|
|
3284
3351
|
limit: z.ZodNumber;
|
|
3285
3352
|
offset: z.ZodNumber;
|
|
@@ -3293,7 +3360,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3293
3360
|
limit: number;
|
|
3294
3361
|
offset: number;
|
|
3295
3362
|
}>>;
|
|
3296
|
-
temporalMetadata: z.ZodLazy<z.ZodObject<{
|
|
3363
|
+
temporalMetadata: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
3297
3364
|
temporalMode: z.ZodString;
|
|
3298
3365
|
asOfTime: z.ZodNullable<z.ZodString>;
|
|
3299
3366
|
validAtTime: z.ZodNullable<z.ZodString>;
|
|
@@ -3347,7 +3414,7 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3347
3414
|
to: string | null;
|
|
3348
3415
|
} | null;
|
|
3349
3416
|
temporalFieldsIncluded: boolean;
|
|
3350
|
-
}
|
|
3417
|
+
}>>>;
|
|
3351
3418
|
}, "strip", z.ZodTypeAny, {
|
|
3352
3419
|
pagination: {
|
|
3353
3420
|
count: number;
|
|
@@ -3355,10 +3422,6 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3355
3422
|
offset: number;
|
|
3356
3423
|
};
|
|
3357
3424
|
data: {
|
|
3358
|
-
topics: {
|
|
3359
|
-
name: string;
|
|
3360
|
-
count: number;
|
|
3361
|
-
}[];
|
|
3362
3425
|
memory: {
|
|
3363
3426
|
id: string;
|
|
3364
3427
|
createdAt: string;
|
|
@@ -3373,10 +3436,26 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3373
3436
|
validTo?: string | null | undefined;
|
|
3374
3437
|
};
|
|
3375
3438
|
score: number;
|
|
3376
|
-
entities
|
|
3439
|
+
entities?: {
|
|
3377
3440
|
name?: string | undefined;
|
|
3378
3441
|
type?: string | undefined;
|
|
3379
|
-
}[];
|
|
3442
|
+
}[] | undefined;
|
|
3443
|
+
topics?: {
|
|
3444
|
+
name: string;
|
|
3445
|
+
count: number;
|
|
3446
|
+
}[] | undefined;
|
|
3447
|
+
searchMethod?: string | undefined;
|
|
3448
|
+
hybridScore?: number | undefined;
|
|
3449
|
+
vectorScore?: number | undefined;
|
|
3450
|
+
vectorRank?: number | null | undefined;
|
|
3451
|
+
fulltextScore?: number | undefined;
|
|
3452
|
+
fulltextRank?: number | null | undefined;
|
|
3453
|
+
explanation?: {
|
|
3454
|
+
matchReason: string;
|
|
3455
|
+
matchedTerms?: string[] | undefined;
|
|
3456
|
+
semanticSimilarity?: number | undefined;
|
|
3457
|
+
contributingFactors?: string[] | undefined;
|
|
3458
|
+
} | undefined;
|
|
3380
3459
|
}[];
|
|
3381
3460
|
temporalMetadata: {
|
|
3382
3461
|
asOfTime: string | null;
|
|
@@ -3392,7 +3471,8 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3392
3471
|
to: string | null;
|
|
3393
3472
|
} | null;
|
|
3394
3473
|
temporalFieldsIncluded: boolean;
|
|
3395
|
-
};
|
|
3474
|
+
} | null;
|
|
3475
|
+
searchMethod?: string | undefined;
|
|
3396
3476
|
}, {
|
|
3397
3477
|
pagination: {
|
|
3398
3478
|
count: number;
|
|
@@ -3400,10 +3480,6 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3400
3480
|
offset: number;
|
|
3401
3481
|
};
|
|
3402
3482
|
data: {
|
|
3403
|
-
topics: {
|
|
3404
|
-
name: string;
|
|
3405
|
-
count: number;
|
|
3406
|
-
}[];
|
|
3407
3483
|
memory: {
|
|
3408
3484
|
id: string;
|
|
3409
3485
|
createdAt: string;
|
|
@@ -3418,10 +3494,26 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3418
3494
|
validTo?: string | null | undefined;
|
|
3419
3495
|
};
|
|
3420
3496
|
score: number;
|
|
3421
|
-
entities
|
|
3497
|
+
entities?: {
|
|
3422
3498
|
name?: string | undefined;
|
|
3423
3499
|
type?: string | undefined;
|
|
3424
|
-
}[];
|
|
3500
|
+
}[] | undefined;
|
|
3501
|
+
topics?: {
|
|
3502
|
+
name: string;
|
|
3503
|
+
count: number;
|
|
3504
|
+
}[] | undefined;
|
|
3505
|
+
searchMethod?: string | undefined;
|
|
3506
|
+
hybridScore?: number | undefined;
|
|
3507
|
+
vectorScore?: number | undefined;
|
|
3508
|
+
vectorRank?: number | null | undefined;
|
|
3509
|
+
fulltextScore?: number | undefined;
|
|
3510
|
+
fulltextRank?: number | null | undefined;
|
|
3511
|
+
explanation?: {
|
|
3512
|
+
matchReason: string;
|
|
3513
|
+
matchedTerms?: string[] | undefined;
|
|
3514
|
+
semanticSimilarity?: number | undefined;
|
|
3515
|
+
contributingFactors?: string[] | undefined;
|
|
3516
|
+
} | undefined;
|
|
3425
3517
|
}[];
|
|
3426
3518
|
temporalMetadata: {
|
|
3427
3519
|
asOfTime: string | null;
|
|
@@ -3437,14 +3529,16 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3437
3529
|
to: string | null;
|
|
3438
3530
|
} | null;
|
|
3439
3531
|
temporalFieldsIncluded: boolean;
|
|
3440
|
-
};
|
|
3532
|
+
} | null;
|
|
3533
|
+
searchMethod?: string | undefined;
|
|
3441
3534
|
}>>;
|
|
3442
3535
|
/**
|
|
3443
3536
|
*
|
|
3444
3537
|
* @typedef {SearchResponse} searchResponse
|
|
3445
3538
|
* @property {SearchResult[]} - Search results with metadata
|
|
3539
|
+
* @property {string} - Search method used for this query
|
|
3446
3540
|
* @property {SearchResponsePagination} - Pagination information
|
|
3447
|
-
* @property {TemporalMetadata} - Temporal query metadata
|
|
3541
|
+
* @property {TemporalMetadata} - Temporal query metadata (null for semantic/hybrid search)
|
|
3448
3542
|
*/
|
|
3449
3543
|
type SearchResponse = z.infer<typeof searchResponse>;
|
|
3450
3544
|
|
|
@@ -3499,10 +3593,16 @@ declare class MemoriesService extends BaseService {
|
|
|
3499
3593
|
*/
|
|
3500
3594
|
createMemory(body: CreateMemoryRequest, requestConfig?: RequestConfig): Promise<HttpResponse<CreateMemoryResponse>>;
|
|
3501
3595
|
/**
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3596
|
+
* Search memories using different search methods:- **keyword** (default): Traditional fulltext search using Lucene
|
|
3597
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
3598
|
+
- **hybrid**: Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
3599
|
+
|
|
3600
|
+
The `mode` parameter controls content filtering (unified, content, facts).
|
|
3601
|
+
The `searchMethod` parameter controls the search algorithm.
|
|
3602
|
+
|
|
3603
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
3604
|
+
* @returns {Promise<HttpResponse<SearchResponse>>} - Search results
|
|
3605
|
+
*/
|
|
3506
3606
|
searchMemories(body: SearchRequest, requestConfig?: RequestConfig): Promise<HttpResponse<SearchResponse>>;
|
|
3507
3607
|
}
|
|
3508
3608
|
|
|
@@ -3584,6 +3684,12 @@ declare enum Mode {
|
|
|
3584
3684
|
FACTS = "facts"
|
|
3585
3685
|
}
|
|
3586
3686
|
|
|
3687
|
+
declare enum SearchMethod {
|
|
3688
|
+
KEYWORD = "keyword",
|
|
3689
|
+
SEMANTIC = "semantic",
|
|
3690
|
+
HYBRID = "hybrid"
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3587
3693
|
declare enum TemporalMode {
|
|
3588
3694
|
CURRENT = "current",
|
|
3589
3695
|
HISTORICAL = "historical",
|
|
@@ -3632,7 +3738,7 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3632
3738
|
validTo?: string | null | undefined;
|
|
3633
3739
|
}>>;
|
|
3634
3740
|
score: z.ZodNumber;
|
|
3635
|
-
entities: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3741
|
+
entities: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3636
3742
|
name: z.ZodOptional<z.ZodString>;
|
|
3637
3743
|
type: z.ZodOptional<z.ZodString>;
|
|
3638
3744
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3641,8 +3747,8 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3641
3747
|
}, {
|
|
3642
3748
|
name?: string | undefined;
|
|
3643
3749
|
type?: string | undefined;
|
|
3644
|
-
}>>, "many"
|
|
3645
|
-
topics: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3750
|
+
}>>, "many">>;
|
|
3751
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3646
3752
|
name: z.ZodString;
|
|
3647
3753
|
count: z.ZodNumber;
|
|
3648
3754
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3651,12 +3757,30 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3651
3757
|
}, {
|
|
3652
3758
|
name: string;
|
|
3653
3759
|
count: number;
|
|
3654
|
-
}>>, "many"
|
|
3760
|
+
}>>, "many">>;
|
|
3761
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
3762
|
+
hybridScore: z.ZodOptional<z.ZodNumber>;
|
|
3763
|
+
vectorScore: z.ZodOptional<z.ZodNumber>;
|
|
3764
|
+
vectorRank: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
3765
|
+
fulltextScore: z.ZodOptional<z.ZodNumber>;
|
|
3766
|
+
fulltextRank: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
3767
|
+
explanation: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
3768
|
+
matchReason: z.ZodString;
|
|
3769
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3770
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
3771
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3772
|
+
}, "strip", z.ZodTypeAny, {
|
|
3773
|
+
matchReason: string;
|
|
3774
|
+
matchedTerms?: string[] | undefined;
|
|
3775
|
+
semanticSimilarity?: number | undefined;
|
|
3776
|
+
contributingFactors?: string[] | undefined;
|
|
3777
|
+
}, {
|
|
3778
|
+
matchReason: string;
|
|
3779
|
+
matchedTerms?: string[] | undefined;
|
|
3780
|
+
semanticSimilarity?: number | undefined;
|
|
3781
|
+
contributingFactors?: string[] | undefined;
|
|
3782
|
+
}>>>;
|
|
3655
3783
|
}, "strip", z.ZodTypeAny, {
|
|
3656
|
-
topics: {
|
|
3657
|
-
name: string;
|
|
3658
|
-
count: number;
|
|
3659
|
-
}[];
|
|
3660
3784
|
memory: {
|
|
3661
3785
|
id: string;
|
|
3662
3786
|
createdAt: string;
|
|
@@ -3671,15 +3795,27 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3671
3795
|
validTo?: string | null | undefined;
|
|
3672
3796
|
};
|
|
3673
3797
|
score: number;
|
|
3674
|
-
entities
|
|
3798
|
+
entities?: {
|
|
3675
3799
|
name?: string | undefined;
|
|
3676
3800
|
type?: string | undefined;
|
|
3677
|
-
}[];
|
|
3678
|
-
|
|
3679
|
-
topics: {
|
|
3801
|
+
}[] | undefined;
|
|
3802
|
+
topics?: {
|
|
3680
3803
|
name: string;
|
|
3681
3804
|
count: number;
|
|
3682
|
-
}[];
|
|
3805
|
+
}[] | undefined;
|
|
3806
|
+
searchMethod?: string | undefined;
|
|
3807
|
+
hybridScore?: number | undefined;
|
|
3808
|
+
vectorScore?: number | undefined;
|
|
3809
|
+
vectorRank?: number | null | undefined;
|
|
3810
|
+
fulltextScore?: number | undefined;
|
|
3811
|
+
fulltextRank?: number | null | undefined;
|
|
3812
|
+
explanation?: {
|
|
3813
|
+
matchReason: string;
|
|
3814
|
+
matchedTerms?: string[] | undefined;
|
|
3815
|
+
semanticSimilarity?: number | undefined;
|
|
3816
|
+
contributingFactors?: string[] | undefined;
|
|
3817
|
+
} | undefined;
|
|
3818
|
+
}, {
|
|
3683
3819
|
memory: {
|
|
3684
3820
|
id: string;
|
|
3685
3821
|
createdAt: string;
|
|
@@ -3694,10 +3830,26 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3694
3830
|
validTo?: string | null | undefined;
|
|
3695
3831
|
};
|
|
3696
3832
|
score: number;
|
|
3697
|
-
entities
|
|
3833
|
+
entities?: {
|
|
3698
3834
|
name?: string | undefined;
|
|
3699
3835
|
type?: string | undefined;
|
|
3700
|
-
}[];
|
|
3836
|
+
}[] | undefined;
|
|
3837
|
+
topics?: {
|
|
3838
|
+
name: string;
|
|
3839
|
+
count: number;
|
|
3840
|
+
}[] | undefined;
|
|
3841
|
+
searchMethod?: string | undefined;
|
|
3842
|
+
hybridScore?: number | undefined;
|
|
3843
|
+
vectorScore?: number | undefined;
|
|
3844
|
+
vectorRank?: number | null | undefined;
|
|
3845
|
+
fulltextScore?: number | undefined;
|
|
3846
|
+
fulltextRank?: number | null | undefined;
|
|
3847
|
+
explanation?: {
|
|
3848
|
+
matchReason: string;
|
|
3849
|
+
matchedTerms?: string[] | undefined;
|
|
3850
|
+
semanticSimilarity?: number | undefined;
|
|
3851
|
+
contributingFactors?: string[] | undefined;
|
|
3852
|
+
} | undefined;
|
|
3701
3853
|
}>>;
|
|
3702
3854
|
/**
|
|
3703
3855
|
*
|
|
@@ -3706,6 +3858,13 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3706
3858
|
* @property {number} - Relevance score for this result
|
|
3707
3859
|
* @property {Entity[]} - Entities mentioned in this memory
|
|
3708
3860
|
* @property {Topic[]} - Topics associated with this memory
|
|
3861
|
+
* @property {string} - Search method used to find this result
|
|
3862
|
+
* @property {number} - Combined RRF score for hybrid search
|
|
3863
|
+
* @property {number} - Vector similarity score (0-1)
|
|
3864
|
+
* @property {number} - Rank in vector search results
|
|
3865
|
+
* @property {number} - Fulltext search score
|
|
3866
|
+
* @property {number} - Rank in fulltext search results
|
|
3867
|
+
* @property {Explanation} - Detailed explanation of the match (only when explain=true)
|
|
3709
3868
|
*/
|
|
3710
3869
|
type SearchResult = z.infer<typeof searchResult>;
|
|
3711
3870
|
|
|
@@ -3793,6 +3952,35 @@ declare const entity: z.ZodLazy<z.ZodObject<{
|
|
|
3793
3952
|
*/
|
|
3794
3953
|
type Entity = z.infer<typeof entity>;
|
|
3795
3954
|
|
|
3955
|
+
/**
|
|
3956
|
+
* The shape of the model inside the application code - what the users use
|
|
3957
|
+
*/
|
|
3958
|
+
declare const explanation: z.ZodLazy<z.ZodObject<{
|
|
3959
|
+
matchReason: z.ZodString;
|
|
3960
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3961
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
3962
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3963
|
+
}, "strip", z.ZodTypeAny, {
|
|
3964
|
+
matchReason: string;
|
|
3965
|
+
matchedTerms?: string[] | undefined;
|
|
3966
|
+
semanticSimilarity?: number | undefined;
|
|
3967
|
+
contributingFactors?: string[] | undefined;
|
|
3968
|
+
}, {
|
|
3969
|
+
matchReason: string;
|
|
3970
|
+
matchedTerms?: string[] | undefined;
|
|
3971
|
+
semanticSimilarity?: number | undefined;
|
|
3972
|
+
contributingFactors?: string[] | undefined;
|
|
3973
|
+
}>>;
|
|
3974
|
+
/**
|
|
3975
|
+
* Detailed explanation of the match (only when explain=true)
|
|
3976
|
+
* @typedef {Explanation} explanation - Detailed explanation of the match (only when explain=true) - Detailed explanation of the match (only when explain=true)
|
|
3977
|
+
* @property {string} - Human-readable explanation of why this result matched
|
|
3978
|
+
* @property {string[]} - Terms from the query that matched (for keyword search)
|
|
3979
|
+
* @property {number} - Cosine similarity score for semantic match (0-1)
|
|
3980
|
+
* @property {string[]} - Factors that contributed to the match
|
|
3981
|
+
*/
|
|
3982
|
+
type Explanation = z.infer<typeof explanation>;
|
|
3983
|
+
|
|
3796
3984
|
/**
|
|
3797
3985
|
* The shape of the model inside the application code - what the users use
|
|
3798
3986
|
*/
|
|
@@ -3877,8 +4065,8 @@ declare const temporalMetadata: z.ZodLazy<z.ZodObject<{
|
|
|
3877
4065
|
temporalFieldsIncluded: boolean;
|
|
3878
4066
|
}>>;
|
|
3879
4067
|
/**
|
|
3880
|
-
* Temporal query metadata
|
|
3881
|
-
* @typedef {TemporalMetadata} temporalMetadata - Temporal query metadata - Temporal query metadata
|
|
4068
|
+
* Temporal query metadata (null for semantic/hybrid search)
|
|
4069
|
+
* @typedef {TemporalMetadata} temporalMetadata - Temporal query metadata (null for semantic/hybrid search) - Temporal query metadata (null for semantic/hybrid search)
|
|
3882
4070
|
* @property {string} - Temporal query mode used
|
|
3883
4071
|
* @property {string} - Point-in-time timestamp
|
|
3884
4072
|
* @property {string} - Validity timestamp
|
|
@@ -5352,4 +5540,4 @@ declare class Memnexus {
|
|
|
5352
5540
|
set token(token: string);
|
|
5353
5541
|
}
|
|
5354
5542
|
|
|
5355
|
-
export { AnalyzeMemoryQualityOkResponse, AnalyzeMemoryQualityOkResponseData, AnalyzePatternsRequest, ApiKey, ApiKeysService, Artifact, ArtifactsService, BehaviorService, CalculateTopicSimilarityRequest, ClusterTopicsRequest, CommunitiesService, Community, CompilePatternsRequest, Conversation, ConversationsService, CreateApiKeyCreatedResponse, CreateApiKeyCreatedResponseData, CreateApiKeyRequest, CreateArtifactCreatedResponse, CreateArtifactRequest, CreateConversationCreatedResponse, CreateConversationRequest, CreateFactCreatedResponse, CreateFactRequest, CreateMemoryRequest, CreateMemoryRequestMemoryType, CreateMemoryResponse, CreateMemoryResponseMeta, DetectCommunitiesRequest, DetectPatternsRequest, DiscoverRelatedTopicsRequest, Entity, Environment, Error$1 as Error, EvaluateFeatureFlagRequest, EventTimeRange, ExecuteGraphRagQueryOkResponse, Fact, FactSearchRequest, FactsService, FindConversationsByTopicOkResponse, FindConversationsByTopicOkResponseMetadata, FindConversationsByTopicRequest, FindSimilarTopicsRequest, GetArtifactByIdOkResponse, GetCommunityByIdOkResponse, GetConversationSummaryOkResponse, GetConversationTimelineOkResponse, GetFactByIdOkResponse, GetTopicByIdOkResponse, GraphRagQueryRequest, GraphRagQueryResponse, GraphRagQueryResponseMetadata, GraphRagService, GroupBy, HealthCheck, HealthCheckStatus, HealthService, HttpError, HttpMetadata, HttpMethod, HttpResponse, IngestionTimeRange, ListApiKeysOkResponse, ListArtifactsOkResponse, ListCommunitiesOkResponse, ListCommunitiesOkResponsePagination, ListConversationsOkResponse, ListConversationsOkResponsePagination, ListFactsOkResponse, ListMemoriesOkResponse, ListPatternsOkResponse, ListPatternsOkResponsePagination, ListTopicsOkResponse, ListTopicsOkResponsePagination, Memnexus, MemoriesService, Memory, MemoryMemoryType1, MemoryMemoryType2, MergeCommunitiesOkResponse, MergeCommunitiesRequest, MergeTopicsRequest, Mode, NoCache, Pagination, Pattern, PatternsService, PruneMemoriesOkResponse, PruneMemoriesOkResponseData, PruneMemoriesRequest, QualityDistribution, QueryCommunitiesRequest, RecordPatternFeedbackRequest, RequestConfig, Results, RetryOptions, Role, SdkConfig, SearchConversationsOkResponse, SearchConversationsRequest, SearchFactsOkResponse, SearchFactsOkResponseMetadata, SearchRequest, SearchResponse, SearchResponsePagination, SearchResult, SearchResultMemory, SearchTopicsOkResponse, SearchTopicsRequest, ServiceCheck, ServiceCheckStatus, SystemService, TemporalMetadata, TemporalMode, Topic, TopicsService, UpdateArtifactOkResponse, UpdateArtifactRequest, UpdateBehavioralStateRequest, UpdateFactOkResponse, UpdateFactRequest, UpdateMemoryOkResponse, UpdateMemoryRequest, UpdateMemoryRequestMemoryType, UpdatePatternRequest, ValidationOptions };
|
|
5543
|
+
export { AnalyzeMemoryQualityOkResponse, AnalyzeMemoryQualityOkResponseData, AnalyzePatternsRequest, ApiKey, ApiKeysService, Artifact, ArtifactsService, BehaviorService, CalculateTopicSimilarityRequest, ClusterTopicsRequest, CommunitiesService, Community, CompilePatternsRequest, Conversation, ConversationsService, CreateApiKeyCreatedResponse, CreateApiKeyCreatedResponseData, CreateApiKeyRequest, CreateArtifactCreatedResponse, CreateArtifactRequest, CreateConversationCreatedResponse, CreateConversationRequest, CreateFactCreatedResponse, CreateFactRequest, CreateMemoryRequest, CreateMemoryRequestMemoryType, CreateMemoryResponse, CreateMemoryResponseMeta, DetectCommunitiesRequest, DetectPatternsRequest, DiscoverRelatedTopicsRequest, Entity, Environment, Error$1 as Error, EvaluateFeatureFlagRequest, EventTimeRange, ExecuteGraphRagQueryOkResponse, Explanation, Fact, FactSearchRequest, FactsService, FindConversationsByTopicOkResponse, FindConversationsByTopicOkResponseMetadata, FindConversationsByTopicRequest, FindSimilarTopicsRequest, GetArtifactByIdOkResponse, GetCommunityByIdOkResponse, GetConversationSummaryOkResponse, GetConversationTimelineOkResponse, GetFactByIdOkResponse, GetTopicByIdOkResponse, GraphRagQueryRequest, GraphRagQueryResponse, GraphRagQueryResponseMetadata, GraphRagService, GroupBy, HealthCheck, HealthCheckStatus, HealthService, HttpError, HttpMetadata, HttpMethod, HttpResponse, IngestionTimeRange, ListApiKeysOkResponse, ListArtifactsOkResponse, ListCommunitiesOkResponse, ListCommunitiesOkResponsePagination, ListConversationsOkResponse, ListConversationsOkResponsePagination, ListFactsOkResponse, ListMemoriesOkResponse, ListPatternsOkResponse, ListPatternsOkResponsePagination, ListTopicsOkResponse, ListTopicsOkResponsePagination, Memnexus, MemoriesService, Memory, MemoryMemoryType1, MemoryMemoryType2, MergeCommunitiesOkResponse, MergeCommunitiesRequest, MergeTopicsRequest, Mode, NoCache, Pagination, Pattern, PatternsService, PruneMemoriesOkResponse, PruneMemoriesOkResponseData, PruneMemoriesRequest, QualityDistribution, QueryCommunitiesRequest, RecordPatternFeedbackRequest, RequestConfig, Results, RetryOptions, Role, SdkConfig, SearchConversationsOkResponse, SearchConversationsRequest, SearchFactsOkResponse, SearchFactsOkResponseMetadata, SearchMethod, SearchRequest, SearchResponse, SearchResponsePagination, SearchResult, SearchResultMemory, SearchTopicsOkResponse, SearchTopicsRequest, ServiceCheck, ServiceCheckStatus, SystemService, TemporalMetadata, TemporalMode, Topic, TopicsService, UpdateArtifactOkResponse, UpdateArtifactRequest, UpdateBehavioralStateRequest, UpdateFactOkResponse, UpdateFactRequest, UpdateMemoryOkResponse, UpdateMemoryRequest, UpdateMemoryRequestMemoryType, UpdatePatternRequest, ValidationOptions };
|