mem0ai 2.1.28 → 2.1.30

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/dist/index.d.mts CHANGED
@@ -23,6 +23,7 @@ interface MemoryOptions {
23
23
  custom_instructions?: string;
24
24
  timestamp?: number;
25
25
  output_format?: string | OutputFormat;
26
+ async_mode?: boolean;
26
27
  }
27
28
  interface ProjectOptions {
28
29
  fields?: string[];
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ interface MemoryOptions {
23
23
  custom_instructions?: string;
24
24
  timestamp?: number;
25
25
  output_format?: string | OutputFormat;
26
+ async_mode?: boolean;
26
27
  }
27
28
  interface ProjectOptions {
28
29
  fields?: string[];
@@ -106,14 +106,17 @@ declare const MemoryConfigSchema: z.ZodObject<{
106
106
  modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
107
107
  apiKey: z.ZodOptional<z.ZodString>;
108
108
  model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
109
+ baseURL: z.ZodOptional<z.ZodString>;
109
110
  }, "strip", z.ZodTypeAny, {
110
111
  modelProperties?: Record<string, any> | undefined;
111
112
  apiKey?: string | undefined;
112
113
  model?: any;
114
+ baseURL?: string | undefined;
113
115
  }, {
114
116
  modelProperties?: Record<string, any> | undefined;
115
117
  apiKey?: string | undefined;
116
118
  model?: any;
119
+ baseURL?: string | undefined;
117
120
  }>;
118
121
  }, "strip", z.ZodTypeAny, {
119
122
  provider: string;
@@ -121,6 +124,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
121
124
  modelProperties?: Record<string, any> | undefined;
122
125
  apiKey?: string | undefined;
123
126
  model?: any;
127
+ baseURL?: string | undefined;
124
128
  };
125
129
  }, {
126
130
  provider: string;
@@ -128,6 +132,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
128
132
  modelProperties?: Record<string, any> | undefined;
129
133
  apiKey?: string | undefined;
130
134
  model?: any;
135
+ baseURL?: string | undefined;
131
136
  };
132
137
  }>;
133
138
  vectorStore: z.ZodObject<{
@@ -170,14 +175,17 @@ declare const MemoryConfigSchema: z.ZodObject<{
170
175
  apiKey: z.ZodOptional<z.ZodString>;
171
176
  model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
172
177
  modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
178
+ baseURL: z.ZodOptional<z.ZodString>;
173
179
  }, "strip", z.ZodTypeAny, {
174
180
  modelProperties?: Record<string, any> | undefined;
175
181
  apiKey?: string | undefined;
176
182
  model?: any;
183
+ baseURL?: string | undefined;
177
184
  }, {
178
185
  modelProperties?: Record<string, any> | undefined;
179
186
  apiKey?: string | undefined;
180
187
  model?: any;
188
+ baseURL?: string | undefined;
181
189
  }>;
182
190
  }, "strip", z.ZodTypeAny, {
183
191
  provider: string;
@@ -185,6 +193,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
185
193
  modelProperties?: Record<string, any> | undefined;
186
194
  apiKey?: string | undefined;
187
195
  model?: any;
196
+ baseURL?: string | undefined;
188
197
  };
189
198
  }, {
190
199
  provider: string;
@@ -192,6 +201,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
192
201
  modelProperties?: Record<string, any> | undefined;
193
202
  apiKey?: string | undefined;
194
203
  model?: any;
204
+ baseURL?: string | undefined;
195
205
  };
196
206
  }>;
197
207
  historyDbPath: z.ZodOptional<z.ZodString>;
@@ -266,6 +276,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
266
276
  modelProperties?: Record<string, any> | undefined;
267
277
  apiKey?: string | undefined;
268
278
  model?: any;
279
+ baseURL?: string | undefined;
269
280
  };
270
281
  };
271
282
  vectorStore: {
@@ -284,6 +295,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
284
295
  modelProperties?: Record<string, any> | undefined;
285
296
  apiKey?: string | undefined;
286
297
  model?: any;
298
+ baseURL?: string | undefined;
287
299
  };
288
300
  };
289
301
  version?: string | undefined;
@@ -315,6 +327,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
315
327
  modelProperties?: Record<string, any> | undefined;
316
328
  apiKey?: string | undefined;
317
329
  model?: any;
330
+ baseURL?: string | undefined;
318
331
  };
319
332
  };
320
333
  vectorStore: {
@@ -333,6 +346,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
333
346
  modelProperties?: Record<string, any> | undefined;
334
347
  apiKey?: string | undefined;
335
348
  model?: any;
349
+ baseURL?: string | undefined;
336
350
  };
337
351
  };
338
352
  version?: string | undefined;
@@ -704,6 +718,30 @@ declare class LangchainVectorStore implements VectorStore {
704
718
  initialize(): Promise<void>;
705
719
  }
706
720
 
721
+ interface VectorizeConfig extends VectorStoreConfig {
722
+ apiKey?: string;
723
+ indexName: string;
724
+ accountId: string;
725
+ }
726
+ declare class VectorizeDB implements VectorStore {
727
+ private client;
728
+ private dimensions;
729
+ private indexName;
730
+ private accountId;
731
+ constructor(config: VectorizeConfig);
732
+ insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
733
+ search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
734
+ get(vectorId: string): Promise<VectorStoreResult | null>;
735
+ update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
736
+ delete(vectorId: string): Promise<void>;
737
+ deleteCol(): Promise<void>;
738
+ list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
739
+ private generateUUID;
740
+ getUserId(): Promise<string>;
741
+ setUserId(userId: string): Promise<void>;
742
+ initialize(): Promise<void>;
743
+ }
744
+
707
745
  interface HistoryManager {
708
746
  addHistory(memoryId: string, previousValue: string | null, newValue: string | null, action: string, createdAt?: string, updatedAt?: string, isDeleted?: number): Promise<void>;
709
747
  getHistory(memoryId: string): Promise<any[]>;
@@ -724,4 +762,4 @@ declare class HistoryManagerFactory {
724
762
  static create(provider: string, config: HistoryStoreConfig): HistoryManager;
725
763
  }
726
764
 
727
- export { type AddMemoryOptions, AnthropicLLM, AzureOpenAIEmbedder, type DeleteAllMemoryOptions, type Embedder, EmbedderFactory, type EmbeddingConfig, type Entity, type GetAllMemoryOptions, GoogleEmbedder, GoogleLLM, type GraphStoreConfig, GroqLLM, HistoryManagerFactory, type HistoryStoreConfig, type LLM, type LLMConfig, LLMFactory, type LLMResponse, LangchainEmbedder, LangchainLLM, LangchainVectorStore, Memory, type MemoryConfig, MemoryConfigSchema, type MemoryItem, MemoryVectorStore, type Message, MistralLLM, type MultiModalMessages, type Neo4jConfig, OllamaEmbedder, OllamaLLM, OpenAIEmbedder, OpenAILLM, OpenAIStructuredLLM, Qdrant, RedisDB, type SearchFilters, type SearchMemoryOptions, type SearchResult, SupabaseDB, type VectorStore, type VectorStoreConfig, VectorStoreFactory, type VectorStoreResult };
765
+ export { type AddMemoryOptions, AnthropicLLM, AzureOpenAIEmbedder, type DeleteAllMemoryOptions, type Embedder, EmbedderFactory, type EmbeddingConfig, type Entity, type GetAllMemoryOptions, GoogleEmbedder, GoogleLLM, type GraphStoreConfig, GroqLLM, HistoryManagerFactory, type HistoryStoreConfig, type LLM, type LLMConfig, LLMFactory, type LLMResponse, LangchainEmbedder, LangchainLLM, LangchainVectorStore, Memory, type MemoryConfig, MemoryConfigSchema, type MemoryItem, MemoryVectorStore, type Message, MistralLLM, type MultiModalMessages, type Neo4jConfig, OllamaEmbedder, OllamaLLM, OpenAIEmbedder, OpenAILLM, OpenAIStructuredLLM, Qdrant, RedisDB, type SearchFilters, type SearchMemoryOptions, type SearchResult, SupabaseDB, type VectorStore, type VectorStoreConfig, VectorStoreFactory, type VectorStoreResult, VectorizeDB };
@@ -106,14 +106,17 @@ declare const MemoryConfigSchema: z.ZodObject<{
106
106
  modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
107
107
  apiKey: z.ZodOptional<z.ZodString>;
108
108
  model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
109
+ baseURL: z.ZodOptional<z.ZodString>;
109
110
  }, "strip", z.ZodTypeAny, {
110
111
  modelProperties?: Record<string, any> | undefined;
111
112
  apiKey?: string | undefined;
112
113
  model?: any;
114
+ baseURL?: string | undefined;
113
115
  }, {
114
116
  modelProperties?: Record<string, any> | undefined;
115
117
  apiKey?: string | undefined;
116
118
  model?: any;
119
+ baseURL?: string | undefined;
117
120
  }>;
118
121
  }, "strip", z.ZodTypeAny, {
119
122
  provider: string;
@@ -121,6 +124,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
121
124
  modelProperties?: Record<string, any> | undefined;
122
125
  apiKey?: string | undefined;
123
126
  model?: any;
127
+ baseURL?: string | undefined;
124
128
  };
125
129
  }, {
126
130
  provider: string;
@@ -128,6 +132,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
128
132
  modelProperties?: Record<string, any> | undefined;
129
133
  apiKey?: string | undefined;
130
134
  model?: any;
135
+ baseURL?: string | undefined;
131
136
  };
132
137
  }>;
133
138
  vectorStore: z.ZodObject<{
@@ -170,14 +175,17 @@ declare const MemoryConfigSchema: z.ZodObject<{
170
175
  apiKey: z.ZodOptional<z.ZodString>;
171
176
  model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
172
177
  modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
178
+ baseURL: z.ZodOptional<z.ZodString>;
173
179
  }, "strip", z.ZodTypeAny, {
174
180
  modelProperties?: Record<string, any> | undefined;
175
181
  apiKey?: string | undefined;
176
182
  model?: any;
183
+ baseURL?: string | undefined;
177
184
  }, {
178
185
  modelProperties?: Record<string, any> | undefined;
179
186
  apiKey?: string | undefined;
180
187
  model?: any;
188
+ baseURL?: string | undefined;
181
189
  }>;
182
190
  }, "strip", z.ZodTypeAny, {
183
191
  provider: string;
@@ -185,6 +193,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
185
193
  modelProperties?: Record<string, any> | undefined;
186
194
  apiKey?: string | undefined;
187
195
  model?: any;
196
+ baseURL?: string | undefined;
188
197
  };
189
198
  }, {
190
199
  provider: string;
@@ -192,6 +201,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
192
201
  modelProperties?: Record<string, any> | undefined;
193
202
  apiKey?: string | undefined;
194
203
  model?: any;
204
+ baseURL?: string | undefined;
195
205
  };
196
206
  }>;
197
207
  historyDbPath: z.ZodOptional<z.ZodString>;
@@ -266,6 +276,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
266
276
  modelProperties?: Record<string, any> | undefined;
267
277
  apiKey?: string | undefined;
268
278
  model?: any;
279
+ baseURL?: string | undefined;
269
280
  };
270
281
  };
271
282
  vectorStore: {
@@ -284,6 +295,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
284
295
  modelProperties?: Record<string, any> | undefined;
285
296
  apiKey?: string | undefined;
286
297
  model?: any;
298
+ baseURL?: string | undefined;
287
299
  };
288
300
  };
289
301
  version?: string | undefined;
@@ -315,6 +327,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
315
327
  modelProperties?: Record<string, any> | undefined;
316
328
  apiKey?: string | undefined;
317
329
  model?: any;
330
+ baseURL?: string | undefined;
318
331
  };
319
332
  };
320
333
  vectorStore: {
@@ -333,6 +346,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
333
346
  modelProperties?: Record<string, any> | undefined;
334
347
  apiKey?: string | undefined;
335
348
  model?: any;
349
+ baseURL?: string | undefined;
336
350
  };
337
351
  };
338
352
  version?: string | undefined;
@@ -704,6 +718,30 @@ declare class LangchainVectorStore implements VectorStore {
704
718
  initialize(): Promise<void>;
705
719
  }
706
720
 
721
+ interface VectorizeConfig extends VectorStoreConfig {
722
+ apiKey?: string;
723
+ indexName: string;
724
+ accountId: string;
725
+ }
726
+ declare class VectorizeDB implements VectorStore {
727
+ private client;
728
+ private dimensions;
729
+ private indexName;
730
+ private accountId;
731
+ constructor(config: VectorizeConfig);
732
+ insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
733
+ search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
734
+ get(vectorId: string): Promise<VectorStoreResult | null>;
735
+ update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
736
+ delete(vectorId: string): Promise<void>;
737
+ deleteCol(): Promise<void>;
738
+ list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
739
+ private generateUUID;
740
+ getUserId(): Promise<string>;
741
+ setUserId(userId: string): Promise<void>;
742
+ initialize(): Promise<void>;
743
+ }
744
+
707
745
  interface HistoryManager {
708
746
  addHistory(memoryId: string, previousValue: string | null, newValue: string | null, action: string, createdAt?: string, updatedAt?: string, isDeleted?: number): Promise<void>;
709
747
  getHistory(memoryId: string): Promise<any[]>;
@@ -724,4 +762,4 @@ declare class HistoryManagerFactory {
724
762
  static create(provider: string, config: HistoryStoreConfig): HistoryManager;
725
763
  }
726
764
 
727
- export { type AddMemoryOptions, AnthropicLLM, AzureOpenAIEmbedder, type DeleteAllMemoryOptions, type Embedder, EmbedderFactory, type EmbeddingConfig, type Entity, type GetAllMemoryOptions, GoogleEmbedder, GoogleLLM, type GraphStoreConfig, GroqLLM, HistoryManagerFactory, type HistoryStoreConfig, type LLM, type LLMConfig, LLMFactory, type LLMResponse, LangchainEmbedder, LangchainLLM, LangchainVectorStore, Memory, type MemoryConfig, MemoryConfigSchema, type MemoryItem, MemoryVectorStore, type Message, MistralLLM, type MultiModalMessages, type Neo4jConfig, OllamaEmbedder, OllamaLLM, OpenAIEmbedder, OpenAILLM, OpenAIStructuredLLM, Qdrant, RedisDB, type SearchFilters, type SearchMemoryOptions, type SearchResult, SupabaseDB, type VectorStore, type VectorStoreConfig, VectorStoreFactory, type VectorStoreResult };
765
+ export { type AddMemoryOptions, AnthropicLLM, AzureOpenAIEmbedder, type DeleteAllMemoryOptions, type Embedder, EmbedderFactory, type EmbeddingConfig, type Entity, type GetAllMemoryOptions, GoogleEmbedder, GoogleLLM, type GraphStoreConfig, GroqLLM, HistoryManagerFactory, type HistoryStoreConfig, type LLM, type LLMConfig, LLMFactory, type LLMResponse, LangchainEmbedder, LangchainLLM, LangchainVectorStore, Memory, type MemoryConfig, MemoryConfigSchema, type MemoryItem, MemoryVectorStore, type Message, MistralLLM, type MultiModalMessages, type Neo4jConfig, OllamaEmbedder, OllamaLLM, OpenAIEmbedder, OpenAILLM, OpenAIStructuredLLM, Qdrant, RedisDB, type SearchFilters, type SearchMemoryOptions, type SearchResult, SupabaseDB, type VectorStore, type VectorStoreConfig, VectorStoreFactory, type VectorStoreResult, VectorizeDB };