@memnexus-ai/typescript-sdk 1.2.4 → 1.4.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 +1394 -442
- package/dist/index.js +978 -507
- package/dist/index.mjs +975 -507
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2953,6 +2953,15 @@ interface ListMemoriesParams {
|
|
|
2953
2953
|
offset?: number;
|
|
2954
2954
|
page?: number;
|
|
2955
2955
|
}
|
|
2956
|
+
interface GetSimilarMemoriesParams {
|
|
2957
|
+
limit?: number;
|
|
2958
|
+
}
|
|
2959
|
+
interface GetConversationMemoriesParams {
|
|
2960
|
+
limit?: number;
|
|
2961
|
+
}
|
|
2962
|
+
interface GetRelatedMemoriesParams {
|
|
2963
|
+
limit?: number;
|
|
2964
|
+
}
|
|
2956
2965
|
|
|
2957
2966
|
/**
|
|
2958
2967
|
* The shape of the model inside the application code - what the users use
|
|
@@ -3130,6 +3139,9 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3130
3139
|
ingestionTimeTo: z.ZodOptional<z.ZodString>;
|
|
3131
3140
|
includeExpired: z.ZodOptional<z.ZodBoolean>;
|
|
3132
3141
|
temporalMode: z.ZodOptional<z.ZodString>;
|
|
3142
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3143
|
+
memoryType: z.ZodOptional<z.ZodString>;
|
|
3144
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
3133
3145
|
}, "strip", z.ZodTypeAny, {
|
|
3134
3146
|
query: string;
|
|
3135
3147
|
mode?: string | undefined;
|
|
@@ -3148,6 +3160,9 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3148
3160
|
ingestionTimeTo?: string | undefined;
|
|
3149
3161
|
includeExpired?: boolean | undefined;
|
|
3150
3162
|
temporalMode?: string | undefined;
|
|
3163
|
+
topics?: string[] | undefined;
|
|
3164
|
+
memoryType?: string | undefined;
|
|
3165
|
+
conversationId?: string | undefined;
|
|
3151
3166
|
}, {
|
|
3152
3167
|
query: string;
|
|
3153
3168
|
mode?: string | undefined;
|
|
@@ -3166,6 +3181,9 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3166
3181
|
ingestionTimeTo?: string | undefined;
|
|
3167
3182
|
includeExpired?: boolean | undefined;
|
|
3168
3183
|
temporalMode?: string | undefined;
|
|
3184
|
+
topics?: string[] | undefined;
|
|
3185
|
+
memoryType?: string | undefined;
|
|
3186
|
+
conversationId?: string | undefined;
|
|
3169
3187
|
}>>;
|
|
3170
3188
|
/**
|
|
3171
3189
|
*
|
|
@@ -3187,6 +3205,9 @@ declare const searchRequest: z.ZodLazy<z.ZodObject<{
|
|
|
3187
3205
|
* @property {string} - Ingestion time range end (ISO 8601 format)
|
|
3188
3206
|
* @property {boolean} - Include expired facts (defaults to false)
|
|
3189
3207
|
* @property {TemporalMode} - Temporal query mode: 'current' (only valid now), 'historical' (as of a point in time), 'evolution' (chronological)
|
|
3208
|
+
* @property {string[]} - Filter by topics - returns memories that have ANY of the specified topics
|
|
3209
|
+
* @property {SearchRequestMemoryType} - Filter by memory type
|
|
3210
|
+
* @property {string} - Filter by conversation ID
|
|
3190
3211
|
*/
|
|
3191
3212
|
type SearchRequest = z.infer<typeof searchRequest>;
|
|
3192
3213
|
|
|
@@ -3542,165 +3563,87 @@ declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3542
3563
|
*/
|
|
3543
3564
|
type SearchResponse = z.infer<typeof searchResponse>;
|
|
3544
3565
|
|
|
3545
|
-
declare class MemoriesService extends BaseService {
|
|
3546
|
-
/**
|
|
3547
|
-
* Retrieve a specific memory by its ID
|
|
3548
|
-
* @param {string} id - The memory ID
|
|
3549
|
-
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
3550
|
-
* @returns {Promise<HttpResponse<any>>} - OK
|
|
3551
|
-
*/
|
|
3552
|
-
getMemoryById(id: string, requestConfig?: RequestConfig): Promise<HttpResponse<void>>;
|
|
3553
|
-
/**
|
|
3554
|
-
* Update an existing memory for the authenticated user
|
|
3555
|
-
* @param {string} id - Memory ID
|
|
3556
|
-
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
3557
|
-
* @returns {Promise<HttpResponse<UpdateMemoryOkResponse>>} - Memory updated successfully
|
|
3558
|
-
*/
|
|
3559
|
-
updateMemory(id: string, body: UpdateMemoryRequest, requestConfig?: RequestConfig): Promise<HttpResponse<UpdateMemoryOkResponse>>;
|
|
3560
|
-
/**
|
|
3561
|
-
* Delete a memory by its ID
|
|
3562
|
-
* @param {string} id - The memory ID
|
|
3563
|
-
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
3564
|
-
* @returns {Promise<HttpResponse<any>>} - No Content
|
|
3565
|
-
*/
|
|
3566
|
-
deleteMemory(id: string, requestConfig?: RequestConfig): Promise<HttpResponse<void>>;
|
|
3567
|
-
/**
|
|
3568
|
-
* List all memories for the authenticated user with pagination
|
|
3569
|
-
* @param {number} [params.limit] - Maximum number of memories to return
|
|
3570
|
-
* @param {number} [params.offset] - Number of memories to skip
|
|
3571
|
-
* @param {number} [params.page] - Page number (alternative to offset)
|
|
3572
|
-
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
3573
|
-
* @returns {Promise<HttpResponse<ListMemoriesOkResponse>>} - List of memories
|
|
3574
|
-
*/
|
|
3575
|
-
listMemories(params?: ListMemoriesParams, requestConfig?: RequestConfig): Promise<HttpResponse<ListMemoriesOkResponse>>;
|
|
3576
|
-
/**
|
|
3577
|
-
* Create a new memory for the authenticated user.
|
|
3578
|
-
**Conversation Management:**
|
|
3579
|
-
- Use `conversationId: "NEW"` to create a new conversation automatically
|
|
3580
|
-
- Provide an existing conversation ID to add to that conversation
|
|
3581
|
-
|
|
3582
|
-
**Session Management:**
|
|
3583
|
-
- Sessions are automatically assigned based on 90-minute gap detection
|
|
3584
|
-
- If the last memory in the conversation was within 90 minutes, the same session is reused
|
|
3585
|
-
- If the gap exceeds 90 minutes, a new session is created
|
|
3586
|
-
|
|
3587
|
-
**Response:**
|
|
3588
|
-
- Returns the created memory in `data` field
|
|
3589
|
-
- Returns session/conversation metadata in `meta` field
|
|
3590
|
-
|
|
3591
|
-
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
3592
|
-
* @returns {Promise<HttpResponse<CreateMemoryResponse>>} - Memory created successfully
|
|
3593
|
-
*/
|
|
3594
|
-
createMemory(body: CreateMemoryRequest, requestConfig?: RequestConfig): Promise<HttpResponse<CreateMemoryResponse>>;
|
|
3595
|
-
/**
|
|
3596
|
-
* Search memories using different search methods:- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
3597
|
-
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
3598
|
-
- **keyword**: Traditional fulltext search using Lucene
|
|
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
|
-
*/
|
|
3606
|
-
searchMemories(body: SearchRequest, requestConfig?: RequestConfig): Promise<HttpResponse<SearchResponse>>;
|
|
3607
|
-
}
|
|
3608
|
-
|
|
3609
|
-
declare enum UpdateMemoryRequestMemoryType {
|
|
3610
|
-
EPISODIC = "episodic",
|
|
3611
|
-
SEMANTIC = "semantic",
|
|
3612
|
-
PROCEDURAL = "procedural"
|
|
3613
|
-
}
|
|
3614
|
-
|
|
3615
|
-
/**
|
|
3616
|
-
* The shape of the model inside the application code - what the users use
|
|
3617
|
-
*/
|
|
3618
|
-
declare const pagination: z.ZodLazy<z.ZodObject<{
|
|
3619
|
-
limit: z.ZodNumber;
|
|
3620
|
-
offset: z.ZodNumber;
|
|
3621
|
-
count: z.ZodNumber;
|
|
3622
|
-
}, "strip", z.ZodTypeAny, {
|
|
3623
|
-
count: number;
|
|
3624
|
-
limit: number;
|
|
3625
|
-
offset: number;
|
|
3626
|
-
}, {
|
|
3627
|
-
count: number;
|
|
3628
|
-
limit: number;
|
|
3629
|
-
offset: number;
|
|
3630
|
-
}>>;
|
|
3631
|
-
/**
|
|
3632
|
-
*
|
|
3633
|
-
* @typedef {Pagination} pagination
|
|
3634
|
-
* @property {number} - Maximum number of items per page
|
|
3635
|
-
* @property {number} - Number of items to skip
|
|
3636
|
-
* @property {number} - Total number of items
|
|
3637
|
-
*/
|
|
3638
|
-
type Pagination = z.infer<typeof pagination>;
|
|
3639
|
-
|
|
3640
|
-
declare enum CreateMemoryRequestMemoryType {
|
|
3641
|
-
EPISODIC = "episodic",
|
|
3642
|
-
SEMANTIC = "semantic",
|
|
3643
|
-
PROCEDURAL = "procedural"
|
|
3644
|
-
}
|
|
3645
|
-
|
|
3646
|
-
declare enum Role {
|
|
3647
|
-
USER = "user",
|
|
3648
|
-
ASSISTANT = "assistant",
|
|
3649
|
-
SYSTEM = "system"
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
/**
|
|
3653
|
-
* The shape of the model inside the application code - what the users use
|
|
3654
|
-
*/
|
|
3655
|
-
declare const createMemoryResponseMeta: z.ZodLazy<z.ZodObject<{
|
|
3656
|
-
conversationId: z.ZodString;
|
|
3657
|
-
sessionId: z.ZodString;
|
|
3658
|
-
sessionCreated: z.ZodBoolean;
|
|
3659
|
-
conversationCreated: z.ZodBoolean;
|
|
3660
|
-
}, "strip", z.ZodTypeAny, {
|
|
3661
|
-
conversationId: string;
|
|
3662
|
-
sessionId: string;
|
|
3663
|
-
sessionCreated: boolean;
|
|
3664
|
-
conversationCreated: boolean;
|
|
3665
|
-
}, {
|
|
3666
|
-
conversationId: string;
|
|
3667
|
-
sessionId: string;
|
|
3668
|
-
sessionCreated: boolean;
|
|
3669
|
-
conversationCreated: boolean;
|
|
3670
|
-
}>>;
|
|
3671
|
-
/**
|
|
3672
|
-
*
|
|
3673
|
-
* @typedef {CreateMemoryResponseMeta} createMemoryResponseMeta
|
|
3674
|
-
* @property {string} - Conversation ID (actual ID if "NEW" was provided)
|
|
3675
|
-
* @property {string} - Auto-assigned session ID based on 90-minute gap detection
|
|
3676
|
-
* @property {boolean} - Whether a new session was created (true) or existing session was reused (false)
|
|
3677
|
-
* @property {boolean} - Whether a new conversation was created (true if conversationId was "NEW")
|
|
3678
|
-
*/
|
|
3679
|
-
type CreateMemoryResponseMeta = z.infer<typeof createMemoryResponseMeta>;
|
|
3680
|
-
|
|
3681
|
-
declare enum Mode {
|
|
3682
|
-
UNIFIED = "unified",
|
|
3683
|
-
CONTENT = "content",
|
|
3684
|
-
FACTS = "facts"
|
|
3685
|
-
}
|
|
3686
|
-
|
|
3687
|
-
declare enum SearchMethod {
|
|
3688
|
-
KEYWORD = "keyword",
|
|
3689
|
-
SEMANTIC = "semantic",
|
|
3690
|
-
HYBRID = "hybrid"
|
|
3691
|
-
}
|
|
3692
|
-
|
|
3693
|
-
declare enum TemporalMode {
|
|
3694
|
-
CURRENT = "current",
|
|
3695
|
-
HISTORICAL = "historical",
|
|
3696
|
-
EVOLUTION = "evolution"
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
3566
|
/**
|
|
3700
3567
|
* The shape of the model inside the application code - what the users use
|
|
3701
3568
|
*/
|
|
3702
|
-
declare const
|
|
3703
|
-
|
|
3569
|
+
declare const getSimilarMemoriesOkResponse: z.ZodLazy<z.ZodObject<{
|
|
3570
|
+
data: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3571
|
+
memory: z.ZodLazy<z.ZodObject<{
|
|
3572
|
+
id: z.ZodString;
|
|
3573
|
+
content: z.ZodString;
|
|
3574
|
+
memoryType: z.ZodString;
|
|
3575
|
+
context: z.ZodOptional<z.ZodString>;
|
|
3576
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3577
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
3578
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
3579
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
3580
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3581
|
+
createdAt: z.ZodString;
|
|
3582
|
+
updatedAt: z.ZodString;
|
|
3583
|
+
}, "strip", z.ZodTypeAny, {
|
|
3584
|
+
id: string;
|
|
3585
|
+
createdAt: string;
|
|
3586
|
+
content: string;
|
|
3587
|
+
updatedAt: string;
|
|
3588
|
+
memoryType: string;
|
|
3589
|
+
context?: string | undefined;
|
|
3590
|
+
topics?: string[] | undefined;
|
|
3591
|
+
timestamp?: string | undefined;
|
|
3592
|
+
eventTime?: string | undefined;
|
|
3593
|
+
validFrom?: string | undefined;
|
|
3594
|
+
validTo?: string | null | undefined;
|
|
3595
|
+
}, {
|
|
3596
|
+
id: string;
|
|
3597
|
+
createdAt: string;
|
|
3598
|
+
content: string;
|
|
3599
|
+
updatedAt: string;
|
|
3600
|
+
memoryType: string;
|
|
3601
|
+
context?: string | undefined;
|
|
3602
|
+
topics?: string[] | undefined;
|
|
3603
|
+
timestamp?: string | undefined;
|
|
3604
|
+
eventTime?: string | undefined;
|
|
3605
|
+
validFrom?: string | undefined;
|
|
3606
|
+
validTo?: string | null | undefined;
|
|
3607
|
+
}>>;
|
|
3608
|
+
score: z.ZodNumber;
|
|
3609
|
+
relationship: z.ZodString;
|
|
3610
|
+
sharedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3611
|
+
}, "strip", z.ZodTypeAny, {
|
|
3612
|
+
memory: {
|
|
3613
|
+
id: string;
|
|
3614
|
+
createdAt: string;
|
|
3615
|
+
content: string;
|
|
3616
|
+
updatedAt: string;
|
|
3617
|
+
memoryType: string;
|
|
3618
|
+
context?: string | undefined;
|
|
3619
|
+
topics?: string[] | undefined;
|
|
3620
|
+
timestamp?: string | undefined;
|
|
3621
|
+
eventTime?: string | undefined;
|
|
3622
|
+
validFrom?: string | undefined;
|
|
3623
|
+
validTo?: string | null | undefined;
|
|
3624
|
+
};
|
|
3625
|
+
score: number;
|
|
3626
|
+
relationship: string;
|
|
3627
|
+
sharedTopics?: string[] | undefined;
|
|
3628
|
+
}, {
|
|
3629
|
+
memory: {
|
|
3630
|
+
id: string;
|
|
3631
|
+
createdAt: string;
|
|
3632
|
+
content: string;
|
|
3633
|
+
updatedAt: string;
|
|
3634
|
+
memoryType: string;
|
|
3635
|
+
context?: string | undefined;
|
|
3636
|
+
topics?: string[] | undefined;
|
|
3637
|
+
timestamp?: string | undefined;
|
|
3638
|
+
eventTime?: string | undefined;
|
|
3639
|
+
validFrom?: string | undefined;
|
|
3640
|
+
validTo?: string | null | undefined;
|
|
3641
|
+
};
|
|
3642
|
+
score: number;
|
|
3643
|
+
relationship: string;
|
|
3644
|
+
sharedTopics?: string[] | undefined;
|
|
3645
|
+
}>>, "many">>;
|
|
3646
|
+
sourceMemory: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
3704
3647
|
id: z.ZodString;
|
|
3705
3648
|
content: z.ZodString;
|
|
3706
3649
|
memoryType: z.ZodString;
|
|
@@ -3736,50 +3679,1290 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3736
3679
|
eventTime?: string | undefined;
|
|
3737
3680
|
validFrom?: string | undefined;
|
|
3738
3681
|
validTo?: string | null | undefined;
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3682
|
+
}>>>;
|
|
3683
|
+
}, "strip", z.ZodTypeAny, {
|
|
3684
|
+
data?: {
|
|
3685
|
+
memory: {
|
|
3686
|
+
id: string;
|
|
3687
|
+
createdAt: string;
|
|
3688
|
+
content: string;
|
|
3689
|
+
updatedAt: string;
|
|
3690
|
+
memoryType: string;
|
|
3691
|
+
context?: string | undefined;
|
|
3692
|
+
topics?: string[] | undefined;
|
|
3693
|
+
timestamp?: string | undefined;
|
|
3694
|
+
eventTime?: string | undefined;
|
|
3695
|
+
validFrom?: string | undefined;
|
|
3696
|
+
validTo?: string | null | undefined;
|
|
3697
|
+
};
|
|
3698
|
+
score: number;
|
|
3699
|
+
relationship: string;
|
|
3700
|
+
sharedTopics?: string[] | undefined;
|
|
3701
|
+
}[] | undefined;
|
|
3702
|
+
sourceMemory?: {
|
|
3703
|
+
id: string;
|
|
3704
|
+
createdAt: string;
|
|
3705
|
+
content: string;
|
|
3706
|
+
updatedAt: string;
|
|
3707
|
+
memoryType: string;
|
|
3708
|
+
context?: string | undefined;
|
|
3709
|
+
topics?: string[] | undefined;
|
|
3710
|
+
timestamp?: string | undefined;
|
|
3711
|
+
eventTime?: string | undefined;
|
|
3712
|
+
validFrom?: string | undefined;
|
|
3713
|
+
validTo?: string | null | undefined;
|
|
3714
|
+
} | undefined;
|
|
3715
|
+
}, {
|
|
3716
|
+
data?: {
|
|
3717
|
+
memory: {
|
|
3718
|
+
id: string;
|
|
3719
|
+
createdAt: string;
|
|
3720
|
+
content: string;
|
|
3721
|
+
updatedAt: string;
|
|
3722
|
+
memoryType: string;
|
|
3723
|
+
context?: string | undefined;
|
|
3724
|
+
topics?: string[] | undefined;
|
|
3725
|
+
timestamp?: string | undefined;
|
|
3726
|
+
eventTime?: string | undefined;
|
|
3727
|
+
validFrom?: string | undefined;
|
|
3728
|
+
validTo?: string | null | undefined;
|
|
3729
|
+
};
|
|
3730
|
+
score: number;
|
|
3731
|
+
relationship: string;
|
|
3732
|
+
sharedTopics?: string[] | undefined;
|
|
3733
|
+
}[] | undefined;
|
|
3734
|
+
sourceMemory?: {
|
|
3735
|
+
id: string;
|
|
3736
|
+
createdAt: string;
|
|
3737
|
+
content: string;
|
|
3738
|
+
updatedAt: string;
|
|
3739
|
+
memoryType: string;
|
|
3740
|
+
context?: string | undefined;
|
|
3741
|
+
topics?: string[] | undefined;
|
|
3742
|
+
timestamp?: string | undefined;
|
|
3743
|
+
eventTime?: string | undefined;
|
|
3744
|
+
validFrom?: string | undefined;
|
|
3745
|
+
validTo?: string | null | undefined;
|
|
3746
|
+
} | undefined;
|
|
3747
|
+
}>>;
|
|
3748
|
+
/**
|
|
3749
|
+
*
|
|
3750
|
+
* @typedef {GetSimilarMemoriesOkResponse} getSimilarMemoriesOkResponse
|
|
3751
|
+
* @property {RelatedMemoryResult[]}
|
|
3752
|
+
* @property {Memory}
|
|
3753
|
+
*/
|
|
3754
|
+
type GetSimilarMemoriesOkResponse = z.infer<typeof getSimilarMemoriesOkResponse>;
|
|
3755
|
+
|
|
3756
|
+
/**
|
|
3757
|
+
* The shape of the model inside the application code - what the users use
|
|
3758
|
+
*/
|
|
3759
|
+
declare const getConversationMemoriesOkResponse: z.ZodLazy<z.ZodObject<{
|
|
3760
|
+
data: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3761
|
+
memory: z.ZodLazy<z.ZodObject<{
|
|
3762
|
+
id: z.ZodString;
|
|
3763
|
+
content: z.ZodString;
|
|
3764
|
+
memoryType: z.ZodString;
|
|
3765
|
+
context: z.ZodOptional<z.ZodString>;
|
|
3766
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3767
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
3768
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
3769
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
3770
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3771
|
+
createdAt: z.ZodString;
|
|
3772
|
+
updatedAt: z.ZodString;
|
|
3773
|
+
}, "strip", z.ZodTypeAny, {
|
|
3774
|
+
id: string;
|
|
3775
|
+
createdAt: string;
|
|
3776
|
+
content: string;
|
|
3777
|
+
updatedAt: string;
|
|
3778
|
+
memoryType: string;
|
|
3779
|
+
context?: string | undefined;
|
|
3780
|
+
topics?: string[] | undefined;
|
|
3781
|
+
timestamp?: string | undefined;
|
|
3782
|
+
eventTime?: string | undefined;
|
|
3783
|
+
validFrom?: string | undefined;
|
|
3784
|
+
validTo?: string | null | undefined;
|
|
3785
|
+
}, {
|
|
3786
|
+
id: string;
|
|
3787
|
+
createdAt: string;
|
|
3788
|
+
content: string;
|
|
3789
|
+
updatedAt: string;
|
|
3790
|
+
memoryType: string;
|
|
3791
|
+
context?: string | undefined;
|
|
3792
|
+
topics?: string[] | undefined;
|
|
3793
|
+
timestamp?: string | undefined;
|
|
3794
|
+
eventTime?: string | undefined;
|
|
3795
|
+
validFrom?: string | undefined;
|
|
3796
|
+
validTo?: string | null | undefined;
|
|
3797
|
+
}>>;
|
|
3798
|
+
score: z.ZodNumber;
|
|
3799
|
+
relationship: z.ZodString;
|
|
3800
|
+
sharedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3754
3801
|
}, "strip", z.ZodTypeAny, {
|
|
3755
|
-
|
|
3756
|
-
|
|
3802
|
+
memory: {
|
|
3803
|
+
id: string;
|
|
3804
|
+
createdAt: string;
|
|
3805
|
+
content: string;
|
|
3806
|
+
updatedAt: string;
|
|
3807
|
+
memoryType: string;
|
|
3808
|
+
context?: string | undefined;
|
|
3809
|
+
topics?: string[] | undefined;
|
|
3810
|
+
timestamp?: string | undefined;
|
|
3811
|
+
eventTime?: string | undefined;
|
|
3812
|
+
validFrom?: string | undefined;
|
|
3813
|
+
validTo?: string | null | undefined;
|
|
3814
|
+
};
|
|
3815
|
+
score: number;
|
|
3816
|
+
relationship: string;
|
|
3817
|
+
sharedTopics?: string[] | undefined;
|
|
3757
3818
|
}, {
|
|
3758
|
-
|
|
3759
|
-
|
|
3819
|
+
memory: {
|
|
3820
|
+
id: string;
|
|
3821
|
+
createdAt: string;
|
|
3822
|
+
content: string;
|
|
3823
|
+
updatedAt: string;
|
|
3824
|
+
memoryType: string;
|
|
3825
|
+
context?: string | undefined;
|
|
3826
|
+
topics?: string[] | undefined;
|
|
3827
|
+
timestamp?: string | undefined;
|
|
3828
|
+
eventTime?: string | undefined;
|
|
3829
|
+
validFrom?: string | undefined;
|
|
3830
|
+
validTo?: string | null | undefined;
|
|
3831
|
+
};
|
|
3832
|
+
score: number;
|
|
3833
|
+
relationship: string;
|
|
3834
|
+
sharedTopics?: string[] | undefined;
|
|
3760
3835
|
}>>, "many">>;
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3836
|
+
sourceMemory: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
3837
|
+
id: z.ZodString;
|
|
3838
|
+
content: z.ZodString;
|
|
3839
|
+
memoryType: z.ZodString;
|
|
3840
|
+
context: z.ZodOptional<z.ZodString>;
|
|
3841
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3842
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
3843
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
3844
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
3845
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3846
|
+
createdAt: z.ZodString;
|
|
3847
|
+
updatedAt: z.ZodString;
|
|
3772
3848
|
}, "strip", z.ZodTypeAny, {
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3849
|
+
id: string;
|
|
3850
|
+
createdAt: string;
|
|
3851
|
+
content: string;
|
|
3852
|
+
updatedAt: string;
|
|
3853
|
+
memoryType: string;
|
|
3854
|
+
context?: string | undefined;
|
|
3855
|
+
topics?: string[] | undefined;
|
|
3856
|
+
timestamp?: string | undefined;
|
|
3857
|
+
eventTime?: string | undefined;
|
|
3858
|
+
validFrom?: string | undefined;
|
|
3859
|
+
validTo?: string | null | undefined;
|
|
3777
3860
|
}, {
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3861
|
+
id: string;
|
|
3862
|
+
createdAt: string;
|
|
3863
|
+
content: string;
|
|
3864
|
+
updatedAt: string;
|
|
3865
|
+
memoryType: string;
|
|
3866
|
+
context?: string | undefined;
|
|
3867
|
+
topics?: string[] | undefined;
|
|
3868
|
+
timestamp?: string | undefined;
|
|
3869
|
+
eventTime?: string | undefined;
|
|
3870
|
+
validFrom?: string | undefined;
|
|
3871
|
+
validTo?: string | null | undefined;
|
|
3782
3872
|
}>>>;
|
|
3873
|
+
conversationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3874
|
+
}, "strip", z.ZodTypeAny, {
|
|
3875
|
+
data?: {
|
|
3876
|
+
memory: {
|
|
3877
|
+
id: string;
|
|
3878
|
+
createdAt: string;
|
|
3879
|
+
content: string;
|
|
3880
|
+
updatedAt: string;
|
|
3881
|
+
memoryType: string;
|
|
3882
|
+
context?: string | undefined;
|
|
3883
|
+
topics?: string[] | undefined;
|
|
3884
|
+
timestamp?: string | undefined;
|
|
3885
|
+
eventTime?: string | undefined;
|
|
3886
|
+
validFrom?: string | undefined;
|
|
3887
|
+
validTo?: string | null | undefined;
|
|
3888
|
+
};
|
|
3889
|
+
score: number;
|
|
3890
|
+
relationship: string;
|
|
3891
|
+
sharedTopics?: string[] | undefined;
|
|
3892
|
+
}[] | undefined;
|
|
3893
|
+
sourceMemory?: {
|
|
3894
|
+
id: string;
|
|
3895
|
+
createdAt: string;
|
|
3896
|
+
content: string;
|
|
3897
|
+
updatedAt: string;
|
|
3898
|
+
memoryType: string;
|
|
3899
|
+
context?: string | undefined;
|
|
3900
|
+
topics?: string[] | undefined;
|
|
3901
|
+
timestamp?: string | undefined;
|
|
3902
|
+
eventTime?: string | undefined;
|
|
3903
|
+
validFrom?: string | undefined;
|
|
3904
|
+
validTo?: string | null | undefined;
|
|
3905
|
+
} | undefined;
|
|
3906
|
+
conversationId?: string | null | undefined;
|
|
3907
|
+
}, {
|
|
3908
|
+
data?: {
|
|
3909
|
+
memory: {
|
|
3910
|
+
id: string;
|
|
3911
|
+
createdAt: string;
|
|
3912
|
+
content: string;
|
|
3913
|
+
updatedAt: string;
|
|
3914
|
+
memoryType: string;
|
|
3915
|
+
context?: string | undefined;
|
|
3916
|
+
topics?: string[] | undefined;
|
|
3917
|
+
timestamp?: string | undefined;
|
|
3918
|
+
eventTime?: string | undefined;
|
|
3919
|
+
validFrom?: string | undefined;
|
|
3920
|
+
validTo?: string | null | undefined;
|
|
3921
|
+
};
|
|
3922
|
+
score: number;
|
|
3923
|
+
relationship: string;
|
|
3924
|
+
sharedTopics?: string[] | undefined;
|
|
3925
|
+
}[] | undefined;
|
|
3926
|
+
sourceMemory?: {
|
|
3927
|
+
id: string;
|
|
3928
|
+
createdAt: string;
|
|
3929
|
+
content: string;
|
|
3930
|
+
updatedAt: string;
|
|
3931
|
+
memoryType: string;
|
|
3932
|
+
context?: string | undefined;
|
|
3933
|
+
topics?: string[] | undefined;
|
|
3934
|
+
timestamp?: string | undefined;
|
|
3935
|
+
eventTime?: string | undefined;
|
|
3936
|
+
validFrom?: string | undefined;
|
|
3937
|
+
validTo?: string | null | undefined;
|
|
3938
|
+
} | undefined;
|
|
3939
|
+
conversationId?: string | null | undefined;
|
|
3940
|
+
}>>;
|
|
3941
|
+
/**
|
|
3942
|
+
*
|
|
3943
|
+
* @typedef {GetConversationMemoriesOkResponse} getConversationMemoriesOkResponse
|
|
3944
|
+
* @property {RelatedMemoryResult[]}
|
|
3945
|
+
* @property {Memory}
|
|
3946
|
+
* @property {string} - The conversation ID (null if memory has no conversation)
|
|
3947
|
+
*/
|
|
3948
|
+
type GetConversationMemoriesOkResponse = z.infer<typeof getConversationMemoriesOkResponse>;
|
|
3949
|
+
|
|
3950
|
+
/**
|
|
3951
|
+
* The shape of the model inside the application code - what the users use
|
|
3952
|
+
*/
|
|
3953
|
+
declare const getRelatedMemoriesOkResponse: z.ZodLazy<z.ZodObject<{
|
|
3954
|
+
data: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3955
|
+
memory: z.ZodLazy<z.ZodObject<{
|
|
3956
|
+
id: z.ZodString;
|
|
3957
|
+
content: z.ZodString;
|
|
3958
|
+
memoryType: z.ZodString;
|
|
3959
|
+
context: z.ZodOptional<z.ZodString>;
|
|
3960
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3961
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
3962
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
3963
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
3964
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3965
|
+
createdAt: z.ZodString;
|
|
3966
|
+
updatedAt: z.ZodString;
|
|
3967
|
+
}, "strip", z.ZodTypeAny, {
|
|
3968
|
+
id: string;
|
|
3969
|
+
createdAt: string;
|
|
3970
|
+
content: string;
|
|
3971
|
+
updatedAt: string;
|
|
3972
|
+
memoryType: string;
|
|
3973
|
+
context?: string | undefined;
|
|
3974
|
+
topics?: string[] | undefined;
|
|
3975
|
+
timestamp?: string | undefined;
|
|
3976
|
+
eventTime?: string | undefined;
|
|
3977
|
+
validFrom?: string | undefined;
|
|
3978
|
+
validTo?: string | null | undefined;
|
|
3979
|
+
}, {
|
|
3980
|
+
id: string;
|
|
3981
|
+
createdAt: string;
|
|
3982
|
+
content: string;
|
|
3983
|
+
updatedAt: string;
|
|
3984
|
+
memoryType: string;
|
|
3985
|
+
context?: string | undefined;
|
|
3986
|
+
topics?: string[] | undefined;
|
|
3987
|
+
timestamp?: string | undefined;
|
|
3988
|
+
eventTime?: string | undefined;
|
|
3989
|
+
validFrom?: string | undefined;
|
|
3990
|
+
validTo?: string | null | undefined;
|
|
3991
|
+
}>>;
|
|
3992
|
+
score: z.ZodNumber;
|
|
3993
|
+
relationship: z.ZodString;
|
|
3994
|
+
sharedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3995
|
+
}, "strip", z.ZodTypeAny, {
|
|
3996
|
+
memory: {
|
|
3997
|
+
id: string;
|
|
3998
|
+
createdAt: string;
|
|
3999
|
+
content: string;
|
|
4000
|
+
updatedAt: string;
|
|
4001
|
+
memoryType: string;
|
|
4002
|
+
context?: string | undefined;
|
|
4003
|
+
topics?: string[] | undefined;
|
|
4004
|
+
timestamp?: string | undefined;
|
|
4005
|
+
eventTime?: string | undefined;
|
|
4006
|
+
validFrom?: string | undefined;
|
|
4007
|
+
validTo?: string | null | undefined;
|
|
4008
|
+
};
|
|
4009
|
+
score: number;
|
|
4010
|
+
relationship: string;
|
|
4011
|
+
sharedTopics?: string[] | undefined;
|
|
4012
|
+
}, {
|
|
4013
|
+
memory: {
|
|
4014
|
+
id: string;
|
|
4015
|
+
createdAt: string;
|
|
4016
|
+
content: string;
|
|
4017
|
+
updatedAt: string;
|
|
4018
|
+
memoryType: string;
|
|
4019
|
+
context?: string | undefined;
|
|
4020
|
+
topics?: string[] | undefined;
|
|
4021
|
+
timestamp?: string | undefined;
|
|
4022
|
+
eventTime?: string | undefined;
|
|
4023
|
+
validFrom?: string | undefined;
|
|
4024
|
+
validTo?: string | null | undefined;
|
|
4025
|
+
};
|
|
4026
|
+
score: number;
|
|
4027
|
+
relationship: string;
|
|
4028
|
+
sharedTopics?: string[] | undefined;
|
|
4029
|
+
}>>, "many">>;
|
|
4030
|
+
sourceMemory: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
4031
|
+
id: z.ZodString;
|
|
4032
|
+
content: z.ZodString;
|
|
4033
|
+
memoryType: z.ZodString;
|
|
4034
|
+
context: z.ZodOptional<z.ZodString>;
|
|
4035
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4036
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
4037
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
4038
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
4039
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4040
|
+
createdAt: z.ZodString;
|
|
4041
|
+
updatedAt: z.ZodString;
|
|
4042
|
+
}, "strip", z.ZodTypeAny, {
|
|
4043
|
+
id: string;
|
|
4044
|
+
createdAt: string;
|
|
4045
|
+
content: string;
|
|
4046
|
+
updatedAt: string;
|
|
4047
|
+
memoryType: string;
|
|
4048
|
+
context?: string | undefined;
|
|
4049
|
+
topics?: string[] | undefined;
|
|
4050
|
+
timestamp?: string | undefined;
|
|
4051
|
+
eventTime?: string | undefined;
|
|
4052
|
+
validFrom?: string | undefined;
|
|
4053
|
+
validTo?: string | null | undefined;
|
|
4054
|
+
}, {
|
|
4055
|
+
id: string;
|
|
4056
|
+
createdAt: string;
|
|
4057
|
+
content: string;
|
|
4058
|
+
updatedAt: string;
|
|
4059
|
+
memoryType: string;
|
|
4060
|
+
context?: string | undefined;
|
|
4061
|
+
topics?: string[] | undefined;
|
|
4062
|
+
timestamp?: string | undefined;
|
|
4063
|
+
eventTime?: string | undefined;
|
|
4064
|
+
validFrom?: string | undefined;
|
|
4065
|
+
validTo?: string | null | undefined;
|
|
4066
|
+
}>>>;
|
|
4067
|
+
}, "strip", z.ZodTypeAny, {
|
|
4068
|
+
data?: {
|
|
4069
|
+
memory: {
|
|
4070
|
+
id: string;
|
|
4071
|
+
createdAt: string;
|
|
4072
|
+
content: string;
|
|
4073
|
+
updatedAt: string;
|
|
4074
|
+
memoryType: string;
|
|
4075
|
+
context?: string | undefined;
|
|
4076
|
+
topics?: string[] | undefined;
|
|
4077
|
+
timestamp?: string | undefined;
|
|
4078
|
+
eventTime?: string | undefined;
|
|
4079
|
+
validFrom?: string | undefined;
|
|
4080
|
+
validTo?: string | null | undefined;
|
|
4081
|
+
};
|
|
4082
|
+
score: number;
|
|
4083
|
+
relationship: string;
|
|
4084
|
+
sharedTopics?: string[] | undefined;
|
|
4085
|
+
}[] | undefined;
|
|
4086
|
+
sourceMemory?: {
|
|
4087
|
+
id: string;
|
|
4088
|
+
createdAt: string;
|
|
4089
|
+
content: string;
|
|
4090
|
+
updatedAt: string;
|
|
4091
|
+
memoryType: string;
|
|
4092
|
+
context?: string | undefined;
|
|
4093
|
+
topics?: string[] | undefined;
|
|
4094
|
+
timestamp?: string | undefined;
|
|
4095
|
+
eventTime?: string | undefined;
|
|
4096
|
+
validFrom?: string | undefined;
|
|
4097
|
+
validTo?: string | null | undefined;
|
|
4098
|
+
} | undefined;
|
|
4099
|
+
}, {
|
|
4100
|
+
data?: {
|
|
4101
|
+
memory: {
|
|
4102
|
+
id: string;
|
|
4103
|
+
createdAt: string;
|
|
4104
|
+
content: string;
|
|
4105
|
+
updatedAt: string;
|
|
4106
|
+
memoryType: string;
|
|
4107
|
+
context?: string | undefined;
|
|
4108
|
+
topics?: string[] | undefined;
|
|
4109
|
+
timestamp?: string | undefined;
|
|
4110
|
+
eventTime?: string | undefined;
|
|
4111
|
+
validFrom?: string | undefined;
|
|
4112
|
+
validTo?: string | null | undefined;
|
|
4113
|
+
};
|
|
4114
|
+
score: number;
|
|
4115
|
+
relationship: string;
|
|
4116
|
+
sharedTopics?: string[] | undefined;
|
|
4117
|
+
}[] | undefined;
|
|
4118
|
+
sourceMemory?: {
|
|
4119
|
+
id: string;
|
|
4120
|
+
createdAt: string;
|
|
4121
|
+
content: string;
|
|
4122
|
+
updatedAt: string;
|
|
4123
|
+
memoryType: string;
|
|
4124
|
+
context?: string | undefined;
|
|
4125
|
+
topics?: string[] | undefined;
|
|
4126
|
+
timestamp?: string | undefined;
|
|
4127
|
+
eventTime?: string | undefined;
|
|
4128
|
+
validFrom?: string | undefined;
|
|
4129
|
+
validTo?: string | null | undefined;
|
|
4130
|
+
} | undefined;
|
|
4131
|
+
}>>;
|
|
4132
|
+
/**
|
|
4133
|
+
*
|
|
4134
|
+
* @typedef {GetRelatedMemoriesOkResponse} getRelatedMemoriesOkResponse
|
|
4135
|
+
* @property {GetRelatedMemoriesOkResponseData[]}
|
|
4136
|
+
* @property {Memory}
|
|
4137
|
+
*/
|
|
4138
|
+
type GetRelatedMemoriesOkResponse = z.infer<typeof getRelatedMemoriesOkResponse>;
|
|
4139
|
+
|
|
4140
|
+
declare class MemoriesService extends BaseService {
|
|
4141
|
+
/**
|
|
4142
|
+
* Retrieve a specific memory by its ID
|
|
4143
|
+
* @param {string} id - The memory ID
|
|
4144
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4145
|
+
* @returns {Promise<HttpResponse<any>>} - OK
|
|
4146
|
+
*/
|
|
4147
|
+
getMemoryById(id: string, requestConfig?: RequestConfig): Promise<HttpResponse<void>>;
|
|
4148
|
+
/**
|
|
4149
|
+
* Update an existing memory for the authenticated user
|
|
4150
|
+
* @param {string} id - Memory ID
|
|
4151
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4152
|
+
* @returns {Promise<HttpResponse<UpdateMemoryOkResponse>>} - Memory updated successfully
|
|
4153
|
+
*/
|
|
4154
|
+
updateMemory(id: string, body: UpdateMemoryRequest, requestConfig?: RequestConfig): Promise<HttpResponse<UpdateMemoryOkResponse>>;
|
|
4155
|
+
/**
|
|
4156
|
+
* Delete a memory by its ID
|
|
4157
|
+
* @param {string} id - The memory ID
|
|
4158
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4159
|
+
* @returns {Promise<HttpResponse<any>>} - No Content
|
|
4160
|
+
*/
|
|
4161
|
+
deleteMemory(id: string, requestConfig?: RequestConfig): Promise<HttpResponse<void>>;
|
|
4162
|
+
/**
|
|
4163
|
+
* List all memories for the authenticated user with pagination
|
|
4164
|
+
* @param {number} [params.limit] - Maximum number of memories to return
|
|
4165
|
+
* @param {number} [params.offset] - Number of memories to skip
|
|
4166
|
+
* @param {number} [params.page] - Page number (alternative to offset)
|
|
4167
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4168
|
+
* @returns {Promise<HttpResponse<ListMemoriesOkResponse>>} - List of memories
|
|
4169
|
+
*/
|
|
4170
|
+
listMemories(params?: ListMemoriesParams, requestConfig?: RequestConfig): Promise<HttpResponse<ListMemoriesOkResponse>>;
|
|
4171
|
+
/**
|
|
4172
|
+
* Create a new memory for the authenticated user.
|
|
4173
|
+
**Conversation Management:**
|
|
4174
|
+
- Use `conversationId: "NEW"` to create a new conversation automatically
|
|
4175
|
+
- Provide an existing conversation ID to add to that conversation
|
|
4176
|
+
|
|
4177
|
+
**Session Management:**
|
|
4178
|
+
- Sessions are automatically assigned based on 90-minute gap detection
|
|
4179
|
+
- If the last memory in the conversation was within 90 minutes, the same session is reused
|
|
4180
|
+
- If the gap exceeds 90 minutes, a new session is created
|
|
4181
|
+
|
|
4182
|
+
**Response:**
|
|
4183
|
+
- Returns the created memory in `data` field
|
|
4184
|
+
- Returns session/conversation metadata in `meta` field
|
|
4185
|
+
|
|
4186
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4187
|
+
* @returns {Promise<HttpResponse<CreateMemoryResponse>>} - Memory created successfully
|
|
4188
|
+
*/
|
|
4189
|
+
createMemory(body: CreateMemoryRequest, requestConfig?: RequestConfig): Promise<HttpResponse<CreateMemoryResponse>>;
|
|
4190
|
+
/**
|
|
4191
|
+
* Search memories using different search methods:- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
4192
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
4193
|
+
- **keyword**: Traditional fulltext search using Lucene
|
|
4194
|
+
|
|
4195
|
+
The `mode` parameter controls content filtering (unified, content, facts).
|
|
4196
|
+
The `searchMethod` parameter controls the search algorithm.
|
|
4197
|
+
|
|
4198
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4199
|
+
* @returns {Promise<HttpResponse<SearchResponse>>} - Search results
|
|
4200
|
+
*/
|
|
4201
|
+
searchMemories(body: SearchRequest, requestConfig?: RequestConfig): Promise<HttpResponse<SearchResponse>>;
|
|
4202
|
+
/**
|
|
4203
|
+
* Find memories that are semantically similar to the given memory.
|
|
4204
|
+
Uses vector similarity search if embeddings are available for the memory.
|
|
4205
|
+
Falls back to topic-based similarity if embeddings are not available.
|
|
4206
|
+
|
|
4207
|
+
The `relationship` field in results indicates the method used:
|
|
4208
|
+
- `similar` - Found via vector/semantic similarity
|
|
4209
|
+
- `similar-by-topic` - Fallback using shared topics
|
|
4210
|
+
|
|
4211
|
+
* @param {string} id - The source memory ID
|
|
4212
|
+
* @param {number} [params.limit] - Maximum number of similar memories to return
|
|
4213
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4214
|
+
* @returns {Promise<HttpResponse<GetSimilarMemoriesOkResponse>>} - Similar memories found
|
|
4215
|
+
*/
|
|
4216
|
+
getSimilarMemories(id: string, params?: GetSimilarMemoriesParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetSimilarMemoriesOkResponse>>;
|
|
4217
|
+
/**
|
|
4218
|
+
* Find other memories that belong to the same conversation as the given memory.
|
|
4219
|
+
Returns memories sorted chronologically (oldest first) to show the conversation flow.
|
|
4220
|
+
If the memory doesn't belong to a conversation, returns an empty array.
|
|
4221
|
+
|
|
4222
|
+
* @param {string} id - The source memory ID
|
|
4223
|
+
* @param {number} [params.limit] - Maximum number of conversation memories to return
|
|
4224
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4225
|
+
* @returns {Promise<HttpResponse<GetConversationMemoriesOkResponse>>} - Conversation memories found
|
|
4226
|
+
*/
|
|
4227
|
+
getConversationMemories(id: string, params?: GetConversationMemoriesParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetConversationMemoriesOkResponse>>;
|
|
4228
|
+
/**
|
|
4229
|
+
* Find memories that share topics with the given memory.
|
|
4230
|
+
The score indicates the ratio of shared topics (1.0 = all topics match).
|
|
4231
|
+
Results are sorted by score (most related first), then by timestamp.
|
|
4232
|
+
|
|
4233
|
+
If the source memory has no topics, returns an empty array.
|
|
4234
|
+
|
|
4235
|
+
* @param {string} id - The source memory ID
|
|
4236
|
+
* @param {number} [params.limit] - Maximum number of related memories to return
|
|
4237
|
+
* @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
|
|
4238
|
+
* @returns {Promise<HttpResponse<GetRelatedMemoriesOkResponse>>} - Related memories found
|
|
4239
|
+
*/
|
|
4240
|
+
getRelatedMemories(id: string, params?: GetRelatedMemoriesParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetRelatedMemoriesOkResponse>>;
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
declare enum UpdateMemoryRequestMemoryType {
|
|
4244
|
+
EPISODIC = "episodic",
|
|
4245
|
+
SEMANTIC = "semantic",
|
|
4246
|
+
PROCEDURAL = "procedural"
|
|
4247
|
+
}
|
|
4248
|
+
|
|
4249
|
+
/**
|
|
4250
|
+
* The shape of the model inside the application code - what the users use
|
|
4251
|
+
*/
|
|
4252
|
+
declare const pagination: z.ZodLazy<z.ZodObject<{
|
|
4253
|
+
limit: z.ZodNumber;
|
|
4254
|
+
offset: z.ZodNumber;
|
|
4255
|
+
count: z.ZodNumber;
|
|
4256
|
+
}, "strip", z.ZodTypeAny, {
|
|
4257
|
+
count: number;
|
|
4258
|
+
limit: number;
|
|
4259
|
+
offset: number;
|
|
4260
|
+
}, {
|
|
4261
|
+
count: number;
|
|
4262
|
+
limit: number;
|
|
4263
|
+
offset: number;
|
|
4264
|
+
}>>;
|
|
4265
|
+
/**
|
|
4266
|
+
*
|
|
4267
|
+
* @typedef {Pagination} pagination
|
|
4268
|
+
* @property {number} - Maximum number of items per page
|
|
4269
|
+
* @property {number} - Number of items to skip
|
|
4270
|
+
* @property {number} - Total number of items
|
|
4271
|
+
*/
|
|
4272
|
+
type Pagination = z.infer<typeof pagination>;
|
|
4273
|
+
|
|
4274
|
+
declare enum CreateMemoryRequestMemoryType {
|
|
4275
|
+
EPISODIC = "episodic",
|
|
4276
|
+
SEMANTIC = "semantic",
|
|
4277
|
+
PROCEDURAL = "procedural"
|
|
4278
|
+
}
|
|
4279
|
+
|
|
4280
|
+
declare enum Role {
|
|
4281
|
+
USER = "user",
|
|
4282
|
+
ASSISTANT = "assistant",
|
|
4283
|
+
SYSTEM = "system"
|
|
4284
|
+
}
|
|
4285
|
+
|
|
4286
|
+
/**
|
|
4287
|
+
* The shape of the model inside the application code - what the users use
|
|
4288
|
+
*/
|
|
4289
|
+
declare const createMemoryResponseMeta: z.ZodLazy<z.ZodObject<{
|
|
4290
|
+
conversationId: z.ZodString;
|
|
4291
|
+
sessionId: z.ZodString;
|
|
4292
|
+
sessionCreated: z.ZodBoolean;
|
|
4293
|
+
conversationCreated: z.ZodBoolean;
|
|
4294
|
+
}, "strip", z.ZodTypeAny, {
|
|
4295
|
+
conversationId: string;
|
|
4296
|
+
sessionId: string;
|
|
4297
|
+
sessionCreated: boolean;
|
|
4298
|
+
conversationCreated: boolean;
|
|
4299
|
+
}, {
|
|
4300
|
+
conversationId: string;
|
|
4301
|
+
sessionId: string;
|
|
4302
|
+
sessionCreated: boolean;
|
|
4303
|
+
conversationCreated: boolean;
|
|
4304
|
+
}>>;
|
|
4305
|
+
/**
|
|
4306
|
+
*
|
|
4307
|
+
* @typedef {CreateMemoryResponseMeta} createMemoryResponseMeta
|
|
4308
|
+
* @property {string} - Conversation ID (actual ID if "NEW" was provided)
|
|
4309
|
+
* @property {string} - Auto-assigned session ID based on 90-minute gap detection
|
|
4310
|
+
* @property {boolean} - Whether a new session was created (true) or existing session was reused (false)
|
|
4311
|
+
* @property {boolean} - Whether a new conversation was created (true if conversationId was "NEW")
|
|
4312
|
+
*/
|
|
4313
|
+
type CreateMemoryResponseMeta = z.infer<typeof createMemoryResponseMeta>;
|
|
4314
|
+
|
|
4315
|
+
declare enum Mode {
|
|
4316
|
+
UNIFIED = "unified",
|
|
4317
|
+
CONTENT = "content",
|
|
4318
|
+
FACTS = "facts"
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
declare enum SearchMethod {
|
|
4322
|
+
KEYWORD = "keyword",
|
|
4323
|
+
SEMANTIC = "semantic",
|
|
4324
|
+
HYBRID = "hybrid"
|
|
4325
|
+
}
|
|
4326
|
+
|
|
4327
|
+
declare enum TemporalMode {
|
|
4328
|
+
CURRENT = "current",
|
|
4329
|
+
HISTORICAL = "historical",
|
|
4330
|
+
EVOLUTION = "evolution"
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
declare enum SearchRequestMemoryType {
|
|
4334
|
+
EPISODIC = "episodic",
|
|
4335
|
+
SEMANTIC = "semantic",
|
|
4336
|
+
PROCEDURAL = "procedural"
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4339
|
+
/**
|
|
4340
|
+
* The shape of the model inside the application code - what the users use
|
|
4341
|
+
*/
|
|
4342
|
+
declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
4343
|
+
memory: z.ZodLazy<z.ZodObject<{
|
|
4344
|
+
id: z.ZodString;
|
|
4345
|
+
content: z.ZodString;
|
|
4346
|
+
memoryType: z.ZodString;
|
|
4347
|
+
context: z.ZodOptional<z.ZodString>;
|
|
4348
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4349
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
4350
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
4351
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
4352
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4353
|
+
createdAt: z.ZodString;
|
|
4354
|
+
updatedAt: z.ZodString;
|
|
4355
|
+
}, "strip", z.ZodTypeAny, {
|
|
4356
|
+
id: string;
|
|
4357
|
+
createdAt: string;
|
|
4358
|
+
content: string;
|
|
4359
|
+
updatedAt: string;
|
|
4360
|
+
memoryType: string;
|
|
4361
|
+
context?: string | undefined;
|
|
4362
|
+
topics?: string[] | undefined;
|
|
4363
|
+
timestamp?: string | undefined;
|
|
4364
|
+
eventTime?: string | undefined;
|
|
4365
|
+
validFrom?: string | undefined;
|
|
4366
|
+
validTo?: string | null | undefined;
|
|
4367
|
+
}, {
|
|
4368
|
+
id: string;
|
|
4369
|
+
createdAt: string;
|
|
4370
|
+
content: string;
|
|
4371
|
+
updatedAt: string;
|
|
4372
|
+
memoryType: string;
|
|
4373
|
+
context?: string | undefined;
|
|
4374
|
+
topics?: string[] | undefined;
|
|
4375
|
+
timestamp?: string | undefined;
|
|
4376
|
+
eventTime?: string | undefined;
|
|
4377
|
+
validFrom?: string | undefined;
|
|
4378
|
+
validTo?: string | null | undefined;
|
|
4379
|
+
}>>;
|
|
4380
|
+
score: z.ZodNumber;
|
|
4381
|
+
entities: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
4382
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4383
|
+
type: z.ZodOptional<z.ZodString>;
|
|
4384
|
+
}, "strip", z.ZodTypeAny, {
|
|
4385
|
+
name?: string | undefined;
|
|
4386
|
+
type?: string | undefined;
|
|
4387
|
+
}, {
|
|
4388
|
+
name?: string | undefined;
|
|
4389
|
+
type?: string | undefined;
|
|
4390
|
+
}>>, "many">>;
|
|
4391
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
4392
|
+
name: z.ZodString;
|
|
4393
|
+
count: z.ZodNumber;
|
|
4394
|
+
}, "strip", z.ZodTypeAny, {
|
|
4395
|
+
name: string;
|
|
4396
|
+
count: number;
|
|
4397
|
+
}, {
|
|
4398
|
+
name: string;
|
|
4399
|
+
count: number;
|
|
4400
|
+
}>>, "many">>;
|
|
4401
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
4402
|
+
hybridScore: z.ZodOptional<z.ZodNumber>;
|
|
4403
|
+
vectorScore: z.ZodOptional<z.ZodNumber>;
|
|
4404
|
+
vectorRank: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
4405
|
+
fulltextScore: z.ZodOptional<z.ZodNumber>;
|
|
4406
|
+
fulltextRank: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
4407
|
+
explanation: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
4408
|
+
matchReason: z.ZodString;
|
|
4409
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4410
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
4411
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4412
|
+
}, "strip", z.ZodTypeAny, {
|
|
4413
|
+
matchReason: string;
|
|
4414
|
+
matchedTerms?: string[] | undefined;
|
|
4415
|
+
semanticSimilarity?: number | undefined;
|
|
4416
|
+
contributingFactors?: string[] | undefined;
|
|
4417
|
+
}, {
|
|
4418
|
+
matchReason: string;
|
|
4419
|
+
matchedTerms?: string[] | undefined;
|
|
4420
|
+
semanticSimilarity?: number | undefined;
|
|
4421
|
+
contributingFactors?: string[] | undefined;
|
|
4422
|
+
}>>>;
|
|
4423
|
+
}, "strip", z.ZodTypeAny, {
|
|
4424
|
+
memory: {
|
|
4425
|
+
id: string;
|
|
4426
|
+
createdAt: string;
|
|
4427
|
+
content: string;
|
|
4428
|
+
updatedAt: string;
|
|
4429
|
+
memoryType: string;
|
|
4430
|
+
context?: string | undefined;
|
|
4431
|
+
topics?: string[] | undefined;
|
|
4432
|
+
timestamp?: string | undefined;
|
|
4433
|
+
eventTime?: string | undefined;
|
|
4434
|
+
validFrom?: string | undefined;
|
|
4435
|
+
validTo?: string | null | undefined;
|
|
4436
|
+
};
|
|
4437
|
+
score: number;
|
|
4438
|
+
entities?: {
|
|
4439
|
+
name?: string | undefined;
|
|
4440
|
+
type?: string | undefined;
|
|
4441
|
+
}[] | undefined;
|
|
4442
|
+
topics?: {
|
|
4443
|
+
name: string;
|
|
4444
|
+
count: number;
|
|
4445
|
+
}[] | undefined;
|
|
4446
|
+
searchMethod?: string | undefined;
|
|
4447
|
+
hybridScore?: number | undefined;
|
|
4448
|
+
vectorScore?: number | undefined;
|
|
4449
|
+
vectorRank?: number | null | undefined;
|
|
4450
|
+
fulltextScore?: number | undefined;
|
|
4451
|
+
fulltextRank?: number | null | undefined;
|
|
4452
|
+
explanation?: {
|
|
4453
|
+
matchReason: string;
|
|
4454
|
+
matchedTerms?: string[] | undefined;
|
|
4455
|
+
semanticSimilarity?: number | undefined;
|
|
4456
|
+
contributingFactors?: string[] | undefined;
|
|
4457
|
+
} | undefined;
|
|
4458
|
+
}, {
|
|
4459
|
+
memory: {
|
|
4460
|
+
id: string;
|
|
4461
|
+
createdAt: string;
|
|
4462
|
+
content: string;
|
|
4463
|
+
updatedAt: string;
|
|
4464
|
+
memoryType: string;
|
|
4465
|
+
context?: string | undefined;
|
|
4466
|
+
topics?: string[] | undefined;
|
|
4467
|
+
timestamp?: string | undefined;
|
|
4468
|
+
eventTime?: string | undefined;
|
|
4469
|
+
validFrom?: string | undefined;
|
|
4470
|
+
validTo?: string | null | undefined;
|
|
4471
|
+
};
|
|
4472
|
+
score: number;
|
|
4473
|
+
entities?: {
|
|
4474
|
+
name?: string | undefined;
|
|
4475
|
+
type?: string | undefined;
|
|
4476
|
+
}[] | undefined;
|
|
4477
|
+
topics?: {
|
|
4478
|
+
name: string;
|
|
4479
|
+
count: number;
|
|
4480
|
+
}[] | undefined;
|
|
4481
|
+
searchMethod?: string | undefined;
|
|
4482
|
+
hybridScore?: number | undefined;
|
|
4483
|
+
vectorScore?: number | undefined;
|
|
4484
|
+
vectorRank?: number | null | undefined;
|
|
4485
|
+
fulltextScore?: number | undefined;
|
|
4486
|
+
fulltextRank?: number | null | undefined;
|
|
4487
|
+
explanation?: {
|
|
4488
|
+
matchReason: string;
|
|
4489
|
+
matchedTerms?: string[] | undefined;
|
|
4490
|
+
semanticSimilarity?: number | undefined;
|
|
4491
|
+
contributingFactors?: string[] | undefined;
|
|
4492
|
+
} | undefined;
|
|
4493
|
+
}>>;
|
|
4494
|
+
/**
|
|
4495
|
+
*
|
|
4496
|
+
* @typedef {SearchResult} searchResult
|
|
4497
|
+
* @property {SearchResultMemory} - The memory object
|
|
4498
|
+
* @property {number} - Relevance score for this result
|
|
4499
|
+
* @property {Entity[]} - Entities mentioned in this memory
|
|
4500
|
+
* @property {Topic[]} - Topics associated with this memory
|
|
4501
|
+
* @property {string} - Search method used to find this result
|
|
4502
|
+
* @property {number} - Combined RRF score for hybrid search
|
|
4503
|
+
* @property {number} - Vector similarity score (0-1)
|
|
4504
|
+
* @property {number} - Rank in vector search results
|
|
4505
|
+
* @property {number} - Fulltext search score
|
|
4506
|
+
* @property {number} - Rank in fulltext search results
|
|
4507
|
+
* @property {Explanation} - Detailed explanation of the match (only when explain=true)
|
|
4508
|
+
*/
|
|
4509
|
+
type SearchResult = z.infer<typeof searchResult>;
|
|
4510
|
+
|
|
4511
|
+
/**
|
|
4512
|
+
* The shape of the model inside the application code - what the users use
|
|
4513
|
+
*/
|
|
4514
|
+
declare const searchResultMemory: z.ZodLazy<z.ZodObject<{
|
|
4515
|
+
id: z.ZodString;
|
|
4516
|
+
content: z.ZodString;
|
|
4517
|
+
memoryType: z.ZodString;
|
|
4518
|
+
context: z.ZodOptional<z.ZodString>;
|
|
4519
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4520
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
4521
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
4522
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
4523
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4524
|
+
createdAt: z.ZodString;
|
|
4525
|
+
updatedAt: z.ZodString;
|
|
4526
|
+
}, "strip", z.ZodTypeAny, {
|
|
4527
|
+
id: string;
|
|
4528
|
+
createdAt: string;
|
|
4529
|
+
content: string;
|
|
4530
|
+
updatedAt: string;
|
|
4531
|
+
memoryType: string;
|
|
4532
|
+
context?: string | undefined;
|
|
4533
|
+
topics?: string[] | undefined;
|
|
4534
|
+
timestamp?: string | undefined;
|
|
4535
|
+
eventTime?: string | undefined;
|
|
4536
|
+
validFrom?: string | undefined;
|
|
4537
|
+
validTo?: string | null | undefined;
|
|
4538
|
+
}, {
|
|
4539
|
+
id: string;
|
|
4540
|
+
createdAt: string;
|
|
4541
|
+
content: string;
|
|
4542
|
+
updatedAt: string;
|
|
4543
|
+
memoryType: string;
|
|
4544
|
+
context?: string | undefined;
|
|
4545
|
+
topics?: string[] | undefined;
|
|
4546
|
+
timestamp?: string | undefined;
|
|
4547
|
+
eventTime?: string | undefined;
|
|
4548
|
+
validFrom?: string | undefined;
|
|
4549
|
+
validTo?: string | null | undefined;
|
|
4550
|
+
}>>;
|
|
4551
|
+
/**
|
|
4552
|
+
* The memory object
|
|
4553
|
+
* @typedef {SearchResultMemory} searchResultMemory - The memory object - The memory object
|
|
4554
|
+
* @property {string} - Unique memory identifier
|
|
4555
|
+
* @property {string} - Memory content
|
|
4556
|
+
* @property {MemoryMemoryType2} - Type of memory
|
|
4557
|
+
* @property {string} - Context or domain of the memory
|
|
4558
|
+
* @property {string[]} - Associated topics
|
|
4559
|
+
* @property {string} - System ingestion timestamp (when the system learned about this)
|
|
4560
|
+
* @property {string} - Event time (when the event actually occurred in reality)
|
|
4561
|
+
* @property {string} - Validity start time (when this fact becomes valid)
|
|
4562
|
+
* @property {string} - Validity end time (when this fact expires, null means never expires)
|
|
4563
|
+
* @property {string} - Creation timestamp
|
|
4564
|
+
* @property {string} - Last update timestamp
|
|
4565
|
+
*/
|
|
4566
|
+
type SearchResultMemory = z.infer<typeof searchResultMemory>;
|
|
4567
|
+
|
|
4568
|
+
declare enum MemoryMemoryType2 {
|
|
4569
|
+
EPISODIC = "episodic",
|
|
4570
|
+
SEMANTIC = "semantic",
|
|
4571
|
+
PROCEDURAL = "procedural"
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
/**
|
|
4575
|
+
* The shape of the model inside the application code - what the users use
|
|
4576
|
+
*/
|
|
4577
|
+
declare const entity: z.ZodLazy<z.ZodObject<{
|
|
4578
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4579
|
+
type: z.ZodOptional<z.ZodString>;
|
|
4580
|
+
}, "strip", z.ZodTypeAny, {
|
|
4581
|
+
name?: string | undefined;
|
|
4582
|
+
type?: string | undefined;
|
|
4583
|
+
}, {
|
|
4584
|
+
name?: string | undefined;
|
|
4585
|
+
type?: string | undefined;
|
|
4586
|
+
}>>;
|
|
4587
|
+
/**
|
|
4588
|
+
*
|
|
4589
|
+
* @typedef {Entity} entity
|
|
4590
|
+
* @property {string} - Entity name
|
|
4591
|
+
* @property {string} - Entity type
|
|
4592
|
+
*/
|
|
4593
|
+
type Entity = z.infer<typeof entity>;
|
|
4594
|
+
|
|
4595
|
+
/**
|
|
4596
|
+
* The shape of the model inside the application code - what the users use
|
|
4597
|
+
*/
|
|
4598
|
+
declare const explanation: z.ZodLazy<z.ZodObject<{
|
|
4599
|
+
matchReason: z.ZodString;
|
|
4600
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4601
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
4602
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4603
|
+
}, "strip", z.ZodTypeAny, {
|
|
4604
|
+
matchReason: string;
|
|
4605
|
+
matchedTerms?: string[] | undefined;
|
|
4606
|
+
semanticSimilarity?: number | undefined;
|
|
4607
|
+
contributingFactors?: string[] | undefined;
|
|
4608
|
+
}, {
|
|
4609
|
+
matchReason: string;
|
|
4610
|
+
matchedTerms?: string[] | undefined;
|
|
4611
|
+
semanticSimilarity?: number | undefined;
|
|
4612
|
+
contributingFactors?: string[] | undefined;
|
|
4613
|
+
}>>;
|
|
4614
|
+
/**
|
|
4615
|
+
* Detailed explanation of the match (only when explain=true)
|
|
4616
|
+
* @typedef {Explanation} explanation - Detailed explanation of the match (only when explain=true) - Detailed explanation of the match (only when explain=true)
|
|
4617
|
+
* @property {string} - Human-readable explanation of why this result matched
|
|
4618
|
+
* @property {string[]} - Terms from the query that matched (for keyword search)
|
|
4619
|
+
* @property {number} - Cosine similarity score for semantic match (0-1)
|
|
4620
|
+
* @property {string[]} - Factors that contributed to the match
|
|
4621
|
+
*/
|
|
4622
|
+
type Explanation = z.infer<typeof explanation>;
|
|
4623
|
+
|
|
4624
|
+
/**
|
|
4625
|
+
* The shape of the model inside the application code - what the users use
|
|
4626
|
+
*/
|
|
4627
|
+
declare const searchResponsePagination: z.ZodLazy<z.ZodObject<{
|
|
4628
|
+
limit: z.ZodNumber;
|
|
4629
|
+
offset: z.ZodNumber;
|
|
4630
|
+
count: z.ZodNumber;
|
|
4631
|
+
}, "strip", z.ZodTypeAny, {
|
|
4632
|
+
count: number;
|
|
4633
|
+
limit: number;
|
|
4634
|
+
offset: number;
|
|
4635
|
+
}, {
|
|
4636
|
+
count: number;
|
|
4637
|
+
limit: number;
|
|
4638
|
+
offset: number;
|
|
4639
|
+
}>>;
|
|
4640
|
+
/**
|
|
4641
|
+
* Pagination information
|
|
4642
|
+
* @typedef {SearchResponsePagination} searchResponsePagination - Pagination information - Pagination information
|
|
4643
|
+
* @property {number} - Maximum number of items per page
|
|
4644
|
+
* @property {number} - Number of items to skip
|
|
4645
|
+
* @property {number} - Total number of items
|
|
4646
|
+
*/
|
|
4647
|
+
type SearchResponsePagination = z.infer<typeof searchResponsePagination>;
|
|
4648
|
+
|
|
4649
|
+
/**
|
|
4650
|
+
* The shape of the model inside the application code - what the users use
|
|
4651
|
+
*/
|
|
4652
|
+
declare const temporalMetadata: z.ZodLazy<z.ZodObject<{
|
|
4653
|
+
temporalMode: z.ZodString;
|
|
4654
|
+
asOfTime: z.ZodNullable<z.ZodString>;
|
|
4655
|
+
validAtTime: z.ZodNullable<z.ZodString>;
|
|
4656
|
+
eventTimeRange: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
4657
|
+
from: z.ZodNullable<z.ZodString>;
|
|
4658
|
+
to: z.ZodNullable<z.ZodString>;
|
|
4659
|
+
}, "strip", z.ZodTypeAny, {
|
|
4660
|
+
from: string | null;
|
|
4661
|
+
to: string | null;
|
|
4662
|
+
}, {
|
|
4663
|
+
from: string | null;
|
|
4664
|
+
to: string | null;
|
|
4665
|
+
}>>>;
|
|
4666
|
+
ingestionTimeRange: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
4667
|
+
from: z.ZodNullable<z.ZodString>;
|
|
4668
|
+
to: z.ZodNullable<z.ZodString>;
|
|
4669
|
+
}, "strip", z.ZodTypeAny, {
|
|
4670
|
+
from: string | null;
|
|
4671
|
+
to: string | null;
|
|
4672
|
+
}, {
|
|
4673
|
+
from: string | null;
|
|
4674
|
+
to: string | null;
|
|
4675
|
+
}>>>;
|
|
4676
|
+
includeExpired: z.ZodBoolean;
|
|
4677
|
+
temporalFieldsIncluded: z.ZodBoolean;
|
|
4678
|
+
}, "strip", z.ZodTypeAny, {
|
|
4679
|
+
asOfTime: string | null;
|
|
4680
|
+
validAtTime: string | null;
|
|
4681
|
+
includeExpired: boolean;
|
|
4682
|
+
temporalMode: string;
|
|
4683
|
+
eventTimeRange: {
|
|
4684
|
+
from: string | null;
|
|
4685
|
+
to: string | null;
|
|
4686
|
+
} | null;
|
|
4687
|
+
ingestionTimeRange: {
|
|
4688
|
+
from: string | null;
|
|
4689
|
+
to: string | null;
|
|
4690
|
+
} | null;
|
|
4691
|
+
temporalFieldsIncluded: boolean;
|
|
4692
|
+
}, {
|
|
4693
|
+
asOfTime: string | null;
|
|
4694
|
+
validAtTime: string | null;
|
|
4695
|
+
includeExpired: boolean;
|
|
4696
|
+
temporalMode: string;
|
|
4697
|
+
eventTimeRange: {
|
|
4698
|
+
from: string | null;
|
|
4699
|
+
to: string | null;
|
|
4700
|
+
} | null;
|
|
4701
|
+
ingestionTimeRange: {
|
|
4702
|
+
from: string | null;
|
|
4703
|
+
to: string | null;
|
|
4704
|
+
} | null;
|
|
4705
|
+
temporalFieldsIncluded: boolean;
|
|
4706
|
+
}>>;
|
|
4707
|
+
/**
|
|
4708
|
+
* Temporal query metadata (null for semantic/hybrid search)
|
|
4709
|
+
* @typedef {TemporalMetadata} temporalMetadata - Temporal query metadata (null for semantic/hybrid search) - Temporal query metadata (null for semantic/hybrid search)
|
|
4710
|
+
* @property {string} - Temporal query mode used
|
|
4711
|
+
* @property {string} - Point-in-time timestamp
|
|
4712
|
+
* @property {string} - Validity timestamp
|
|
4713
|
+
* @property {EventTimeRange} - Event time range filter
|
|
4714
|
+
* @property {IngestionTimeRange} - Ingestion time range filter
|
|
4715
|
+
* @property {boolean} - Whether expired facts are included
|
|
4716
|
+
* @property {boolean} - Whether temporal fields are included in results
|
|
4717
|
+
*/
|
|
4718
|
+
type TemporalMetadata = z.infer<typeof temporalMetadata>;
|
|
4719
|
+
|
|
4720
|
+
/**
|
|
4721
|
+
* The shape of the model inside the application code - what the users use
|
|
4722
|
+
*/
|
|
4723
|
+
declare const eventTimeRange: z.ZodLazy<z.ZodObject<{
|
|
4724
|
+
from: z.ZodNullable<z.ZodString>;
|
|
4725
|
+
to: z.ZodNullable<z.ZodString>;
|
|
4726
|
+
}, "strip", z.ZodTypeAny, {
|
|
4727
|
+
from: string | null;
|
|
4728
|
+
to: string | null;
|
|
4729
|
+
}, {
|
|
4730
|
+
from: string | null;
|
|
4731
|
+
to: string | null;
|
|
4732
|
+
}>>;
|
|
4733
|
+
/**
|
|
4734
|
+
* Event time range filter
|
|
4735
|
+
* @typedef {EventTimeRange} eventTimeRange - Event time range filter - Event time range filter
|
|
4736
|
+
* @property {string}
|
|
4737
|
+
* @property {string}
|
|
4738
|
+
*/
|
|
4739
|
+
type EventTimeRange = z.infer<typeof eventTimeRange>;
|
|
4740
|
+
|
|
4741
|
+
/**
|
|
4742
|
+
* The shape of the model inside the application code - what the users use
|
|
4743
|
+
*/
|
|
4744
|
+
declare const ingestionTimeRange: z.ZodLazy<z.ZodObject<{
|
|
4745
|
+
from: z.ZodNullable<z.ZodString>;
|
|
4746
|
+
to: z.ZodNullable<z.ZodString>;
|
|
4747
|
+
}, "strip", z.ZodTypeAny, {
|
|
4748
|
+
from: string | null;
|
|
4749
|
+
to: string | null;
|
|
4750
|
+
}, {
|
|
4751
|
+
from: string | null;
|
|
4752
|
+
to: string | null;
|
|
4753
|
+
}>>;
|
|
4754
|
+
/**
|
|
4755
|
+
* Ingestion time range filter
|
|
4756
|
+
* @typedef {IngestionTimeRange} ingestionTimeRange - Ingestion time range filter - Ingestion time range filter
|
|
4757
|
+
* @property {string}
|
|
4758
|
+
* @property {string}
|
|
4759
|
+
*/
|
|
4760
|
+
type IngestionTimeRange = z.infer<typeof ingestionTimeRange>;
|
|
4761
|
+
|
|
4762
|
+
/**
|
|
4763
|
+
* The shape of the model inside the application code - what the users use
|
|
4764
|
+
*/
|
|
4765
|
+
declare const relatedMemoryResult: z.ZodLazy<z.ZodObject<{
|
|
4766
|
+
memory: z.ZodLazy<z.ZodObject<{
|
|
4767
|
+
id: z.ZodString;
|
|
4768
|
+
content: z.ZodString;
|
|
4769
|
+
memoryType: z.ZodString;
|
|
4770
|
+
context: z.ZodOptional<z.ZodString>;
|
|
4771
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4772
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
4773
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
4774
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
4775
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4776
|
+
createdAt: z.ZodString;
|
|
4777
|
+
/**
|
|
4778
|
+
*
|
|
4779
|
+
* @typedef {RelatedMemoryResult} relatedMemoryResult
|
|
4780
|
+
* @property {RelatedMemoryResultMemory} - The related memory object
|
|
4781
|
+
* @property {number} - Relevance score (0-1). For similar: semantic similarity. For related: topic overlap ratio. For conversation: position score.
|
|
4782
|
+
* @property {string} - Type of relationship: similar, similar-by-topic, conversation, or topic
|
|
4783
|
+
* @property {string[]} - Topics shared with the source memory (only for topic relationship)
|
|
4784
|
+
*/
|
|
4785
|
+
updatedAt: z.ZodString;
|
|
4786
|
+
}, "strip", z.ZodTypeAny, {
|
|
4787
|
+
id: string;
|
|
4788
|
+
createdAt: string;
|
|
4789
|
+
content: string;
|
|
4790
|
+
updatedAt: string;
|
|
4791
|
+
memoryType: string;
|
|
4792
|
+
context?: string | undefined;
|
|
4793
|
+
topics?: string[] | undefined;
|
|
4794
|
+
timestamp?: string | undefined;
|
|
4795
|
+
eventTime?: string | undefined;
|
|
4796
|
+
validFrom?: string | undefined;
|
|
4797
|
+
validTo?: string | null | undefined;
|
|
4798
|
+
}, {
|
|
4799
|
+
id: string;
|
|
4800
|
+
createdAt: string;
|
|
4801
|
+
content: string;
|
|
4802
|
+
updatedAt: string;
|
|
4803
|
+
memoryType: string;
|
|
4804
|
+
context?: string | undefined;
|
|
4805
|
+
topics?: string[] | undefined;
|
|
4806
|
+
timestamp?: string | undefined;
|
|
4807
|
+
eventTime?: string | undefined;
|
|
4808
|
+
validFrom?: string | undefined;
|
|
4809
|
+
validTo?: string | null | undefined;
|
|
4810
|
+
}>>;
|
|
4811
|
+
score: z.ZodNumber;
|
|
4812
|
+
relationship: z.ZodString;
|
|
4813
|
+
sharedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4814
|
+
}, "strip", z.ZodTypeAny, {
|
|
4815
|
+
memory: {
|
|
4816
|
+
id: string;
|
|
4817
|
+
createdAt: string;
|
|
4818
|
+
content: string;
|
|
4819
|
+
updatedAt: string;
|
|
4820
|
+
memoryType: string;
|
|
4821
|
+
context?: string | undefined;
|
|
4822
|
+
topics?: string[] | undefined;
|
|
4823
|
+
timestamp?: string | undefined;
|
|
4824
|
+
eventTime?: string | undefined;
|
|
4825
|
+
validFrom?: string | undefined;
|
|
4826
|
+
validTo?: string | null | undefined;
|
|
4827
|
+
};
|
|
4828
|
+
score: number;
|
|
4829
|
+
relationship: string;
|
|
4830
|
+
sharedTopics?: string[] | undefined;
|
|
4831
|
+
}, {
|
|
4832
|
+
memory: {
|
|
4833
|
+
id: string;
|
|
4834
|
+
createdAt: string;
|
|
4835
|
+
content: string;
|
|
4836
|
+
updatedAt: string;
|
|
4837
|
+
memoryType: string;
|
|
4838
|
+
context?: string | undefined;
|
|
4839
|
+
topics?: string[] | undefined;
|
|
4840
|
+
timestamp?: string | undefined;
|
|
4841
|
+
eventTime?: string | undefined;
|
|
4842
|
+
validFrom?: string | undefined;
|
|
4843
|
+
validTo?: string | null | undefined;
|
|
4844
|
+
};
|
|
4845
|
+
score: number;
|
|
4846
|
+
relationship: string;
|
|
4847
|
+
sharedTopics?: string[] | undefined;
|
|
4848
|
+
}>>;
|
|
4849
|
+
/**
|
|
4850
|
+
*
|
|
4851
|
+
* @typedef {RelatedMemoryResult} relatedMemoryResult
|
|
4852
|
+
* @property {RelatedMemoryResultMemory} - The related memory object
|
|
4853
|
+
* @property {number} - Relevance score (0-1). For similar: semantic similarity. For related: topic overlap ratio. For conversation: position score.
|
|
4854
|
+
* @property {string} - Type of relationship: similar, similar-by-topic, conversation, or topic
|
|
4855
|
+
* @property {string[]} - Topics shared with the source memory (only for topic relationship)
|
|
4856
|
+
*/
|
|
4857
|
+
type RelatedMemoryResult = z.infer<typeof relatedMemoryResult>;
|
|
4858
|
+
|
|
4859
|
+
/**
|
|
4860
|
+
* The shape of the model inside the application code - what the users use
|
|
4861
|
+
*/
|
|
4862
|
+
declare const relatedMemoryResultMemory: z.ZodLazy<z.ZodObject<{
|
|
4863
|
+
id: z.ZodString;
|
|
4864
|
+
content: z.ZodString;
|
|
4865
|
+
memoryType: z.ZodString;
|
|
4866
|
+
context: z.ZodOptional<z.ZodString>;
|
|
4867
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4868
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
4869
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
4870
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
4871
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4872
|
+
createdAt: z.ZodString;
|
|
4873
|
+
updatedAt: z.ZodString;
|
|
4874
|
+
}, "strip", z.ZodTypeAny, {
|
|
4875
|
+
id: string;
|
|
4876
|
+
createdAt: string;
|
|
4877
|
+
content: string;
|
|
4878
|
+
updatedAt: string;
|
|
4879
|
+
memoryType: string;
|
|
4880
|
+
context?: string | undefined;
|
|
4881
|
+
topics?: string[] | undefined;
|
|
4882
|
+
timestamp?: string | undefined;
|
|
4883
|
+
eventTime?: string | undefined;
|
|
4884
|
+
validFrom?: string | undefined;
|
|
4885
|
+
validTo?: string | null | undefined;
|
|
4886
|
+
}, {
|
|
4887
|
+
id: string;
|
|
4888
|
+
createdAt: string;
|
|
4889
|
+
content: string;
|
|
4890
|
+
updatedAt: string;
|
|
4891
|
+
memoryType: string;
|
|
4892
|
+
context?: string | undefined;
|
|
4893
|
+
topics?: string[] | undefined;
|
|
4894
|
+
timestamp?: string | undefined;
|
|
4895
|
+
eventTime?: string | undefined;
|
|
4896
|
+
validFrom?: string | undefined;
|
|
4897
|
+
validTo?: string | null | undefined;
|
|
4898
|
+
}>>;
|
|
4899
|
+
/**
|
|
4900
|
+
* The related memory object
|
|
4901
|
+
* @typedef {RelatedMemoryResultMemory} relatedMemoryResultMemory - The related memory object - The related memory object
|
|
4902
|
+
* @property {string} - Unique memory identifier
|
|
4903
|
+
* @property {string} - Memory content
|
|
4904
|
+
* @property {MemoryMemoryType3} - Type of memory
|
|
4905
|
+
* @property {string} - Context or domain of the memory
|
|
4906
|
+
* @property {string[]} - Associated topics
|
|
4907
|
+
* @property {string} - System ingestion timestamp (when the system learned about this)
|
|
4908
|
+
* @property {string} - Event time (when the event actually occurred in reality)
|
|
4909
|
+
* @property {string} - Validity start time (when this fact becomes valid)
|
|
4910
|
+
* @property {string} - Validity end time (when this fact expires, null means never expires)
|
|
4911
|
+
* @property {string} - Creation timestamp
|
|
4912
|
+
* @property {string} - Last update timestamp
|
|
4913
|
+
*/
|
|
4914
|
+
type RelatedMemoryResultMemory = z.infer<typeof relatedMemoryResultMemory>;
|
|
4915
|
+
|
|
4916
|
+
declare enum MemoryMemoryType3 {
|
|
4917
|
+
EPISODIC = "episodic",
|
|
4918
|
+
SEMANTIC = "semantic",
|
|
4919
|
+
PROCEDURAL = "procedural"
|
|
4920
|
+
}
|
|
4921
|
+
|
|
4922
|
+
/**
|
|
4923
|
+
* The shape of the model inside the application code - what the users use
|
|
4924
|
+
*/
|
|
4925
|
+
declare const getRelatedMemoriesOkResponseData: z.ZodLazy<z.ZodObject<{
|
|
4926
|
+
memory: z.ZodLazy<z.ZodObject<{
|
|
4927
|
+
id: z.ZodString;
|
|
4928
|
+
content: z.ZodString;
|
|
4929
|
+
memoryType: z.ZodString;
|
|
4930
|
+
context: z.ZodOptional<z.ZodString>;
|
|
4931
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4932
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
4933
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
4934
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
4935
|
+
validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4936
|
+
createdAt: z.ZodString;
|
|
4937
|
+
updatedAt: z.ZodString;
|
|
4938
|
+
}, "strip", z.ZodTypeAny, {
|
|
4939
|
+
id: string;
|
|
4940
|
+
createdAt: string;
|
|
4941
|
+
content: string;
|
|
4942
|
+
updatedAt: string;
|
|
4943
|
+
memoryType: string;
|
|
4944
|
+
context?: string | undefined;
|
|
4945
|
+
topics?: string[] | undefined;
|
|
4946
|
+
timestamp?: string | undefined;
|
|
4947
|
+
eventTime?: string | undefined;
|
|
4948
|
+
validFrom?: string | undefined;
|
|
4949
|
+
validTo?: string | null | undefined;
|
|
4950
|
+
}, {
|
|
4951
|
+
id: string;
|
|
4952
|
+
createdAt: string;
|
|
4953
|
+
content: string;
|
|
4954
|
+
updatedAt: string;
|
|
4955
|
+
memoryType: string;
|
|
4956
|
+
context?: string | undefined;
|
|
4957
|
+
topics?: string[] | undefined;
|
|
4958
|
+
timestamp?: string | undefined;
|
|
4959
|
+
eventTime?: string | undefined;
|
|
4960
|
+
validFrom?: string | undefined;
|
|
4961
|
+
validTo?: string | null | undefined;
|
|
4962
|
+
}>>;
|
|
4963
|
+
score: z.ZodNumber;
|
|
4964
|
+
relationship: z.ZodString;
|
|
4965
|
+
sharedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3783
4966
|
}, "strip", z.ZodTypeAny, {
|
|
3784
4967
|
memory: {
|
|
3785
4968
|
id: string;
|
|
@@ -3795,26 +4978,8 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3795
4978
|
validTo?: string | null | undefined;
|
|
3796
4979
|
};
|
|
3797
4980
|
score: number;
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
type?: string | undefined;
|
|
3801
|
-
}[] | undefined;
|
|
3802
|
-
topics?: {
|
|
3803
|
-
name: string;
|
|
3804
|
-
count: number;
|
|
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;
|
|
4981
|
+
relationship: string;
|
|
4982
|
+
sharedTopics?: string[] | undefined;
|
|
3818
4983
|
}, {
|
|
3819
4984
|
memory: {
|
|
3820
4985
|
id: string;
|
|
@@ -3830,48 +4995,23 @@ declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
|
3830
4995
|
validTo?: string | null | undefined;
|
|
3831
4996
|
};
|
|
3832
4997
|
score: number;
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
type?: string | undefined;
|
|
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;
|
|
4998
|
+
relationship: string;
|
|
4999
|
+
sharedTopics?: string[] | undefined;
|
|
3853
5000
|
}>>;
|
|
3854
5001
|
/**
|
|
3855
5002
|
*
|
|
3856
|
-
* @typedef {
|
|
3857
|
-
* @property {
|
|
3858
|
-
* @property {number} - Relevance score
|
|
3859
|
-
* @property {
|
|
3860
|
-
* @property {
|
|
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)
|
|
5003
|
+
* @typedef {GetRelatedMemoriesOkResponseData} getRelatedMemoriesOkResponseData
|
|
5004
|
+
* @property {DataMemory} - The related memory object
|
|
5005
|
+
* @property {number} - Relevance score (0-1). For similar: semantic similarity. For related: topic overlap ratio. For conversation: position score.
|
|
5006
|
+
* @property {string} - Type of relationship: similar, similar-by-topic, conversation, or topic
|
|
5007
|
+
* @property {string[]} - Topics shared between source and this memory
|
|
3868
5008
|
*/
|
|
3869
|
-
type
|
|
5009
|
+
type GetRelatedMemoriesOkResponseData = z.infer<typeof getRelatedMemoriesOkResponseData>;
|
|
3870
5010
|
|
|
3871
5011
|
/**
|
|
3872
5012
|
* The shape of the model inside the application code - what the users use
|
|
3873
5013
|
*/
|
|
3874
|
-
declare const
|
|
5014
|
+
declare const dataMemory: z.ZodLazy<z.ZodObject<{
|
|
3875
5015
|
id: z.ZodString;
|
|
3876
5016
|
content: z.ZodString;
|
|
3877
5017
|
memoryType: z.ZodString;
|
|
@@ -3909,11 +5049,11 @@ declare const searchResultMemory: z.ZodLazy<z.ZodObject<{
|
|
|
3909
5049
|
validTo?: string | null | undefined;
|
|
3910
5050
|
}>>;
|
|
3911
5051
|
/**
|
|
3912
|
-
* The memory object
|
|
3913
|
-
* @typedef {
|
|
5052
|
+
* The related memory object
|
|
5053
|
+
* @typedef {DataMemory} dataMemory - The related memory object - The related memory object
|
|
3914
5054
|
* @property {string} - Unique memory identifier
|
|
3915
5055
|
* @property {string} - Memory content
|
|
3916
|
-
* @property {
|
|
5056
|
+
* @property {MemoryMemoryType4} - Type of memory
|
|
3917
5057
|
* @property {string} - Context or domain of the memory
|
|
3918
5058
|
* @property {string[]} - Associated topics
|
|
3919
5059
|
* @property {string} - System ingestion timestamp (when the system learned about this)
|
|
@@ -3923,202 +5063,14 @@ declare const searchResultMemory: z.ZodLazy<z.ZodObject<{
|
|
|
3923
5063
|
* @property {string} - Creation timestamp
|
|
3924
5064
|
* @property {string} - Last update timestamp
|
|
3925
5065
|
*/
|
|
3926
|
-
type
|
|
5066
|
+
type DataMemory = z.infer<typeof dataMemory>;
|
|
3927
5067
|
|
|
3928
|
-
declare enum
|
|
5068
|
+
declare enum MemoryMemoryType4 {
|
|
3929
5069
|
EPISODIC = "episodic",
|
|
3930
5070
|
SEMANTIC = "semantic",
|
|
3931
5071
|
PROCEDURAL = "procedural"
|
|
3932
5072
|
}
|
|
3933
5073
|
|
|
3934
|
-
/**
|
|
3935
|
-
* The shape of the model inside the application code - what the users use
|
|
3936
|
-
*/
|
|
3937
|
-
declare const entity: z.ZodLazy<z.ZodObject<{
|
|
3938
|
-
name: z.ZodOptional<z.ZodString>;
|
|
3939
|
-
type: z.ZodOptional<z.ZodString>;
|
|
3940
|
-
}, "strip", z.ZodTypeAny, {
|
|
3941
|
-
name?: string | undefined;
|
|
3942
|
-
type?: string | undefined;
|
|
3943
|
-
}, {
|
|
3944
|
-
name?: string | undefined;
|
|
3945
|
-
type?: string | undefined;
|
|
3946
|
-
}>>;
|
|
3947
|
-
/**
|
|
3948
|
-
*
|
|
3949
|
-
* @typedef {Entity} entity
|
|
3950
|
-
* @property {string} - Entity name
|
|
3951
|
-
* @property {string} - Entity type
|
|
3952
|
-
*/
|
|
3953
|
-
type Entity = z.infer<typeof entity>;
|
|
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
|
-
|
|
3984
|
-
/**
|
|
3985
|
-
* The shape of the model inside the application code - what the users use
|
|
3986
|
-
*/
|
|
3987
|
-
declare const searchResponsePagination: z.ZodLazy<z.ZodObject<{
|
|
3988
|
-
limit: z.ZodNumber;
|
|
3989
|
-
offset: z.ZodNumber;
|
|
3990
|
-
count: z.ZodNumber;
|
|
3991
|
-
}, "strip", z.ZodTypeAny, {
|
|
3992
|
-
count: number;
|
|
3993
|
-
limit: number;
|
|
3994
|
-
offset: number;
|
|
3995
|
-
}, {
|
|
3996
|
-
count: number;
|
|
3997
|
-
limit: number;
|
|
3998
|
-
offset: number;
|
|
3999
|
-
}>>;
|
|
4000
|
-
/**
|
|
4001
|
-
* Pagination information
|
|
4002
|
-
* @typedef {SearchResponsePagination} searchResponsePagination - Pagination information - Pagination information
|
|
4003
|
-
* @property {number} - Maximum number of items per page
|
|
4004
|
-
* @property {number} - Number of items to skip
|
|
4005
|
-
* @property {number} - Total number of items
|
|
4006
|
-
*/
|
|
4007
|
-
type SearchResponsePagination = z.infer<typeof searchResponsePagination>;
|
|
4008
|
-
|
|
4009
|
-
/**
|
|
4010
|
-
* The shape of the model inside the application code - what the users use
|
|
4011
|
-
*/
|
|
4012
|
-
declare const temporalMetadata: z.ZodLazy<z.ZodObject<{
|
|
4013
|
-
temporalMode: z.ZodString;
|
|
4014
|
-
asOfTime: z.ZodNullable<z.ZodString>;
|
|
4015
|
-
validAtTime: z.ZodNullable<z.ZodString>;
|
|
4016
|
-
eventTimeRange: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
4017
|
-
from: z.ZodNullable<z.ZodString>;
|
|
4018
|
-
to: z.ZodNullable<z.ZodString>;
|
|
4019
|
-
}, "strip", z.ZodTypeAny, {
|
|
4020
|
-
from: string | null;
|
|
4021
|
-
to: string | null;
|
|
4022
|
-
}, {
|
|
4023
|
-
from: string | null;
|
|
4024
|
-
to: string | null;
|
|
4025
|
-
}>>>;
|
|
4026
|
-
ingestionTimeRange: z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
4027
|
-
from: z.ZodNullable<z.ZodString>;
|
|
4028
|
-
to: z.ZodNullable<z.ZodString>;
|
|
4029
|
-
}, "strip", z.ZodTypeAny, {
|
|
4030
|
-
from: string | null;
|
|
4031
|
-
to: string | null;
|
|
4032
|
-
}, {
|
|
4033
|
-
from: string | null;
|
|
4034
|
-
to: string | null;
|
|
4035
|
-
}>>>;
|
|
4036
|
-
includeExpired: z.ZodBoolean;
|
|
4037
|
-
temporalFieldsIncluded: z.ZodBoolean;
|
|
4038
|
-
}, "strip", z.ZodTypeAny, {
|
|
4039
|
-
asOfTime: string | null;
|
|
4040
|
-
validAtTime: string | null;
|
|
4041
|
-
includeExpired: boolean;
|
|
4042
|
-
temporalMode: string;
|
|
4043
|
-
eventTimeRange: {
|
|
4044
|
-
from: string | null;
|
|
4045
|
-
to: string | null;
|
|
4046
|
-
} | null;
|
|
4047
|
-
ingestionTimeRange: {
|
|
4048
|
-
from: string | null;
|
|
4049
|
-
to: string | null;
|
|
4050
|
-
} | null;
|
|
4051
|
-
temporalFieldsIncluded: boolean;
|
|
4052
|
-
}, {
|
|
4053
|
-
asOfTime: string | null;
|
|
4054
|
-
validAtTime: string | null;
|
|
4055
|
-
includeExpired: boolean;
|
|
4056
|
-
temporalMode: string;
|
|
4057
|
-
eventTimeRange: {
|
|
4058
|
-
from: string | null;
|
|
4059
|
-
to: string | null;
|
|
4060
|
-
} | null;
|
|
4061
|
-
ingestionTimeRange: {
|
|
4062
|
-
from: string | null;
|
|
4063
|
-
to: string | null;
|
|
4064
|
-
} | null;
|
|
4065
|
-
temporalFieldsIncluded: boolean;
|
|
4066
|
-
}>>;
|
|
4067
|
-
/**
|
|
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)
|
|
4070
|
-
* @property {string} - Temporal query mode used
|
|
4071
|
-
* @property {string} - Point-in-time timestamp
|
|
4072
|
-
* @property {string} - Validity timestamp
|
|
4073
|
-
* @property {EventTimeRange} - Event time range filter
|
|
4074
|
-
* @property {IngestionTimeRange} - Ingestion time range filter
|
|
4075
|
-
* @property {boolean} - Whether expired facts are included
|
|
4076
|
-
* @property {boolean} - Whether temporal fields are included in results
|
|
4077
|
-
*/
|
|
4078
|
-
type TemporalMetadata = z.infer<typeof temporalMetadata>;
|
|
4079
|
-
|
|
4080
|
-
/**
|
|
4081
|
-
* The shape of the model inside the application code - what the users use
|
|
4082
|
-
*/
|
|
4083
|
-
declare const eventTimeRange: z.ZodLazy<z.ZodObject<{
|
|
4084
|
-
from: z.ZodNullable<z.ZodString>;
|
|
4085
|
-
to: z.ZodNullable<z.ZodString>;
|
|
4086
|
-
}, "strip", z.ZodTypeAny, {
|
|
4087
|
-
from: string | null;
|
|
4088
|
-
to: string | null;
|
|
4089
|
-
}, {
|
|
4090
|
-
from: string | null;
|
|
4091
|
-
to: string | null;
|
|
4092
|
-
}>>;
|
|
4093
|
-
/**
|
|
4094
|
-
* Event time range filter
|
|
4095
|
-
* @typedef {EventTimeRange} eventTimeRange - Event time range filter - Event time range filter
|
|
4096
|
-
* @property {string}
|
|
4097
|
-
* @property {string}
|
|
4098
|
-
*/
|
|
4099
|
-
type EventTimeRange = z.infer<typeof eventTimeRange>;
|
|
4100
|
-
|
|
4101
|
-
/**
|
|
4102
|
-
* The shape of the model inside the application code - what the users use
|
|
4103
|
-
*/
|
|
4104
|
-
declare const ingestionTimeRange: z.ZodLazy<z.ZodObject<{
|
|
4105
|
-
from: z.ZodNullable<z.ZodString>;
|
|
4106
|
-
to: z.ZodNullable<z.ZodString>;
|
|
4107
|
-
}, "strip", z.ZodTypeAny, {
|
|
4108
|
-
from: string | null;
|
|
4109
|
-
to: string | null;
|
|
4110
|
-
}, {
|
|
4111
|
-
from: string | null;
|
|
4112
|
-
to: string | null;
|
|
4113
|
-
}>>;
|
|
4114
|
-
/**
|
|
4115
|
-
* Ingestion time range filter
|
|
4116
|
-
* @typedef {IngestionTimeRange} ingestionTimeRange - Ingestion time range filter - Ingestion time range filter
|
|
4117
|
-
* @property {string}
|
|
4118
|
-
* @property {string}
|
|
4119
|
-
*/
|
|
4120
|
-
type IngestionTimeRange = z.infer<typeof ingestionTimeRange>;
|
|
4121
|
-
|
|
4122
5074
|
declare enum NoCache {
|
|
4123
5075
|
_1 = "1",
|
|
4124
5076
|
TRUE_ = "true"
|
|
@@ -5540,4 +6492,4 @@ declare class Memnexus {
|
|
|
5540
6492
|
set token(token: string);
|
|
5541
6493
|
}
|
|
5542
6494
|
|
|
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 };
|
|
6495
|
+
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, DataMemory, DetectCommunitiesRequest, DetectPatternsRequest, DiscoverRelatedTopicsRequest, Entity, Environment, Error$1 as Error, EvaluateFeatureFlagRequest, EventTimeRange, ExecuteGraphRagQueryOkResponse, Explanation, Fact, FactSearchRequest, FactsService, FindConversationsByTopicOkResponse, FindConversationsByTopicOkResponseMetadata, FindConversationsByTopicRequest, FindSimilarTopicsRequest, GetArtifactByIdOkResponse, GetCommunityByIdOkResponse, GetConversationMemoriesOkResponse, GetConversationSummaryOkResponse, GetConversationTimelineOkResponse, GetFactByIdOkResponse, GetRelatedMemoriesOkResponse, GetRelatedMemoriesOkResponseData, GetSimilarMemoriesOkResponse, 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, MemoryMemoryType3, MemoryMemoryType4, MergeCommunitiesOkResponse, MergeCommunitiesRequest, MergeTopicsRequest, Mode, NoCache, Pagination, Pattern, PatternsService, PruneMemoriesOkResponse, PruneMemoriesOkResponseData, PruneMemoriesRequest, QualityDistribution, QueryCommunitiesRequest, RecordPatternFeedbackRequest, RelatedMemoryResult, RelatedMemoryResultMemory, RequestConfig, Results, RetryOptions, Role, SdkConfig, SearchConversationsOkResponse, SearchConversationsRequest, SearchFactsOkResponse, SearchFactsOkResponseMetadata, SearchMethod, SearchRequest, SearchRequestMemoryType, SearchResponse, SearchResponsePagination, SearchResult, SearchResultMemory, SearchTopicsOkResponse, SearchTopicsRequest, ServiceCheck, ServiceCheckStatus, SystemService, TemporalMetadata, TemporalMode, Topic, TopicsService, UpdateArtifactOkResponse, UpdateArtifactRequest, UpdateBehavioralStateRequest, UpdateFactOkResponse, UpdateFactRequest, UpdateMemoryOkResponse, UpdateMemoryRequest, UpdateMemoryRequestMemoryType, UpdatePatternRequest, ValidationOptions };
|