@ztorchan/mem0ai 2.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 +64 -0
- package/dist/index.d.mts +281 -0
- package/dist/index.d.ts +281 -0
- package/dist/index.js +724 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +687 -0
- package/dist/index.mjs.map +1 -0
- package/dist/oss/index.d.mts +952 -0
- package/dist/oss/index.d.ts +952 -0
- package/dist/oss/index.js +5563 -0
- package/dist/oss/index.js.map +1 -0
- package/dist/oss/index.mjs +5509 -0
- package/dist/oss/index.mjs.map +1 -0
- package/package.json +133 -0
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { QdrantClient } from '@qdrant/js-client-rest';
|
|
3
|
+
import { VectorStore as VectorStore$1 } from '@langchain/core/vectorstores';
|
|
4
|
+
|
|
5
|
+
interface MultiModalMessages {
|
|
6
|
+
type: "image_url";
|
|
7
|
+
image_url: {
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface Message {
|
|
12
|
+
role: string;
|
|
13
|
+
content: string | MultiModalMessages;
|
|
14
|
+
}
|
|
15
|
+
interface EmbeddingConfig {
|
|
16
|
+
apiKey?: string;
|
|
17
|
+
model?: string | any;
|
|
18
|
+
baseURL?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
embeddingDims?: number;
|
|
21
|
+
modelProperties?: Record<string, any>;
|
|
22
|
+
}
|
|
23
|
+
interface VectorStoreConfig {
|
|
24
|
+
collectionName?: string;
|
|
25
|
+
dimension?: number;
|
|
26
|
+
dbPath?: string;
|
|
27
|
+
client?: any;
|
|
28
|
+
instance?: any;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
interface HistoryStoreConfig {
|
|
32
|
+
provider: string;
|
|
33
|
+
config: {
|
|
34
|
+
historyDbPath?: string;
|
|
35
|
+
supabaseUrl?: string;
|
|
36
|
+
supabaseKey?: string;
|
|
37
|
+
tableName?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface LLMConfig {
|
|
41
|
+
provider?: string;
|
|
42
|
+
baseURL?: string;
|
|
43
|
+
config?: Record<string, any>;
|
|
44
|
+
apiKey?: string;
|
|
45
|
+
model?: string | any;
|
|
46
|
+
modelProperties?: Record<string, any>;
|
|
47
|
+
}
|
|
48
|
+
interface Neo4jConfig {
|
|
49
|
+
url: string;
|
|
50
|
+
username: string;
|
|
51
|
+
password: string;
|
|
52
|
+
}
|
|
53
|
+
interface GraphStoreConfig {
|
|
54
|
+
provider: string;
|
|
55
|
+
config: Neo4jConfig;
|
|
56
|
+
llm?: LLMConfig;
|
|
57
|
+
customPrompt?: string;
|
|
58
|
+
}
|
|
59
|
+
interface MemoryConfig {
|
|
60
|
+
version?: string;
|
|
61
|
+
embedder: {
|
|
62
|
+
provider: string;
|
|
63
|
+
config: EmbeddingConfig;
|
|
64
|
+
};
|
|
65
|
+
vectorStore: {
|
|
66
|
+
provider: string;
|
|
67
|
+
config: VectorStoreConfig;
|
|
68
|
+
};
|
|
69
|
+
llm: {
|
|
70
|
+
provider: string;
|
|
71
|
+
config: LLMConfig;
|
|
72
|
+
};
|
|
73
|
+
historyStore?: HistoryStoreConfig;
|
|
74
|
+
disableHistory?: boolean;
|
|
75
|
+
historyDbPath?: string;
|
|
76
|
+
customPrompt?: string;
|
|
77
|
+
graphStore?: GraphStoreConfig;
|
|
78
|
+
enableGraph?: boolean;
|
|
79
|
+
}
|
|
80
|
+
interface MemoryItem {
|
|
81
|
+
id: string;
|
|
82
|
+
memory: string;
|
|
83
|
+
hash?: string;
|
|
84
|
+
createdAt?: string;
|
|
85
|
+
updatedAt?: string;
|
|
86
|
+
score?: number;
|
|
87
|
+
metadata?: Record<string, any>;
|
|
88
|
+
}
|
|
89
|
+
interface SearchFilters {
|
|
90
|
+
userId?: string;
|
|
91
|
+
agentId?: string;
|
|
92
|
+
runId?: string;
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
}
|
|
95
|
+
interface SearchResult {
|
|
96
|
+
results: MemoryItem[];
|
|
97
|
+
relations?: any[];
|
|
98
|
+
}
|
|
99
|
+
interface VectorStoreResult {
|
|
100
|
+
id: string;
|
|
101
|
+
payload: Record<string, any>;
|
|
102
|
+
score?: number;
|
|
103
|
+
}
|
|
104
|
+
declare const MemoryConfigSchema: z.ZodObject<{
|
|
105
|
+
version: z.ZodOptional<z.ZodString>;
|
|
106
|
+
embedder: z.ZodObject<{
|
|
107
|
+
provider: z.ZodString;
|
|
108
|
+
config: z.ZodObject<{
|
|
109
|
+
modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
110
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
111
|
+
model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
|
|
112
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
113
|
+
embeddingDims: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
url: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
modelProperties?: Record<string, any> | undefined;
|
|
117
|
+
apiKey?: string | undefined;
|
|
118
|
+
model?: any;
|
|
119
|
+
baseURL?: string | undefined;
|
|
120
|
+
embeddingDims?: number | undefined;
|
|
121
|
+
url?: string | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
modelProperties?: Record<string, any> | undefined;
|
|
124
|
+
apiKey?: string | undefined;
|
|
125
|
+
model?: any;
|
|
126
|
+
baseURL?: string | undefined;
|
|
127
|
+
embeddingDims?: number | undefined;
|
|
128
|
+
url?: string | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
provider: string;
|
|
132
|
+
config: {
|
|
133
|
+
modelProperties?: Record<string, any> | undefined;
|
|
134
|
+
apiKey?: string | undefined;
|
|
135
|
+
model?: any;
|
|
136
|
+
baseURL?: string | undefined;
|
|
137
|
+
embeddingDims?: number | undefined;
|
|
138
|
+
url?: string | undefined;
|
|
139
|
+
};
|
|
140
|
+
}, {
|
|
141
|
+
provider: string;
|
|
142
|
+
config: {
|
|
143
|
+
modelProperties?: Record<string, any> | undefined;
|
|
144
|
+
apiKey?: string | undefined;
|
|
145
|
+
model?: any;
|
|
146
|
+
baseURL?: string | undefined;
|
|
147
|
+
embeddingDims?: number | undefined;
|
|
148
|
+
url?: string | undefined;
|
|
149
|
+
};
|
|
150
|
+
}>;
|
|
151
|
+
vectorStore: z.ZodObject<{
|
|
152
|
+
provider: z.ZodString;
|
|
153
|
+
config: z.ZodObject<{
|
|
154
|
+
collectionName: z.ZodOptional<z.ZodString>;
|
|
155
|
+
dimension: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
dbPath: z.ZodOptional<z.ZodString>;
|
|
157
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
158
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
159
|
+
collectionName: z.ZodOptional<z.ZodString>;
|
|
160
|
+
dimension: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
dbPath: z.ZodOptional<z.ZodString>;
|
|
162
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
163
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
164
|
+
collectionName: z.ZodOptional<z.ZodString>;
|
|
165
|
+
dimension: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
dbPath: z.ZodOptional<z.ZodString>;
|
|
167
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
168
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
provider: string;
|
|
171
|
+
config: {
|
|
172
|
+
collectionName?: string | undefined;
|
|
173
|
+
dimension?: number | undefined;
|
|
174
|
+
dbPath?: string | undefined;
|
|
175
|
+
client?: any;
|
|
176
|
+
} & {
|
|
177
|
+
[k: string]: unknown;
|
|
178
|
+
};
|
|
179
|
+
}, {
|
|
180
|
+
provider: string;
|
|
181
|
+
config: {
|
|
182
|
+
collectionName?: string | undefined;
|
|
183
|
+
dimension?: number | undefined;
|
|
184
|
+
dbPath?: string | undefined;
|
|
185
|
+
client?: any;
|
|
186
|
+
} & {
|
|
187
|
+
[k: string]: unknown;
|
|
188
|
+
};
|
|
189
|
+
}>;
|
|
190
|
+
llm: z.ZodObject<{
|
|
191
|
+
provider: z.ZodString;
|
|
192
|
+
config: z.ZodObject<{
|
|
193
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
194
|
+
model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
|
|
195
|
+
modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
196
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
modelProperties?: Record<string, any> | undefined;
|
|
199
|
+
apiKey?: string | undefined;
|
|
200
|
+
model?: any;
|
|
201
|
+
baseURL?: string | undefined;
|
|
202
|
+
}, {
|
|
203
|
+
modelProperties?: Record<string, any> | undefined;
|
|
204
|
+
apiKey?: string | undefined;
|
|
205
|
+
model?: any;
|
|
206
|
+
baseURL?: string | undefined;
|
|
207
|
+
}>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
provider: string;
|
|
210
|
+
config: {
|
|
211
|
+
modelProperties?: Record<string, any> | undefined;
|
|
212
|
+
apiKey?: string | undefined;
|
|
213
|
+
model?: any;
|
|
214
|
+
baseURL?: string | undefined;
|
|
215
|
+
};
|
|
216
|
+
}, {
|
|
217
|
+
provider: string;
|
|
218
|
+
config: {
|
|
219
|
+
modelProperties?: Record<string, any> | undefined;
|
|
220
|
+
apiKey?: string | undefined;
|
|
221
|
+
model?: any;
|
|
222
|
+
baseURL?: string | undefined;
|
|
223
|
+
};
|
|
224
|
+
}>;
|
|
225
|
+
historyDbPath: z.ZodOptional<z.ZodString>;
|
|
226
|
+
customPrompt: z.ZodOptional<z.ZodString>;
|
|
227
|
+
enableGraph: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
graphStore: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
provider: z.ZodString;
|
|
230
|
+
config: z.ZodObject<{
|
|
231
|
+
url: z.ZodString;
|
|
232
|
+
username: z.ZodString;
|
|
233
|
+
password: z.ZodString;
|
|
234
|
+
}, "strip", z.ZodTypeAny, {
|
|
235
|
+
url: string;
|
|
236
|
+
username: string;
|
|
237
|
+
password: string;
|
|
238
|
+
}, {
|
|
239
|
+
url: string;
|
|
240
|
+
username: string;
|
|
241
|
+
password: string;
|
|
242
|
+
}>;
|
|
243
|
+
llm: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
provider: z.ZodString;
|
|
245
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
246
|
+
}, "strip", z.ZodTypeAny, {
|
|
247
|
+
provider: string;
|
|
248
|
+
config: Record<string, any>;
|
|
249
|
+
}, {
|
|
250
|
+
provider: string;
|
|
251
|
+
config: Record<string, any>;
|
|
252
|
+
}>>;
|
|
253
|
+
customPrompt: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
provider: string;
|
|
256
|
+
config: {
|
|
257
|
+
url: string;
|
|
258
|
+
username: string;
|
|
259
|
+
password: string;
|
|
260
|
+
};
|
|
261
|
+
llm?: {
|
|
262
|
+
provider: string;
|
|
263
|
+
config: Record<string, any>;
|
|
264
|
+
} | undefined;
|
|
265
|
+
customPrompt?: string | undefined;
|
|
266
|
+
}, {
|
|
267
|
+
provider: string;
|
|
268
|
+
config: {
|
|
269
|
+
url: string;
|
|
270
|
+
username: string;
|
|
271
|
+
password: string;
|
|
272
|
+
};
|
|
273
|
+
llm?: {
|
|
274
|
+
provider: string;
|
|
275
|
+
config: Record<string, any>;
|
|
276
|
+
} | undefined;
|
|
277
|
+
customPrompt?: string | undefined;
|
|
278
|
+
}>>;
|
|
279
|
+
historyStore: z.ZodOptional<z.ZodObject<{
|
|
280
|
+
provider: z.ZodString;
|
|
281
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
282
|
+
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
provider: string;
|
|
284
|
+
config: Record<string, any>;
|
|
285
|
+
}, {
|
|
286
|
+
provider: string;
|
|
287
|
+
config: Record<string, any>;
|
|
288
|
+
}>>;
|
|
289
|
+
disableHistory: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
embedder: {
|
|
292
|
+
provider: string;
|
|
293
|
+
config: {
|
|
294
|
+
modelProperties?: Record<string, any> | undefined;
|
|
295
|
+
apiKey?: string | undefined;
|
|
296
|
+
model?: any;
|
|
297
|
+
baseURL?: string | undefined;
|
|
298
|
+
embeddingDims?: number | undefined;
|
|
299
|
+
url?: string | undefined;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
vectorStore: {
|
|
303
|
+
provider: string;
|
|
304
|
+
config: {
|
|
305
|
+
collectionName?: string | undefined;
|
|
306
|
+
dimension?: number | undefined;
|
|
307
|
+
dbPath?: string | undefined;
|
|
308
|
+
client?: any;
|
|
309
|
+
} & {
|
|
310
|
+
[k: string]: unknown;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
llm: {
|
|
314
|
+
provider: string;
|
|
315
|
+
config: {
|
|
316
|
+
modelProperties?: Record<string, any> | undefined;
|
|
317
|
+
apiKey?: string | undefined;
|
|
318
|
+
model?: any;
|
|
319
|
+
baseURL?: string | undefined;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
version?: string | undefined;
|
|
323
|
+
historyDbPath?: string | undefined;
|
|
324
|
+
customPrompt?: string | undefined;
|
|
325
|
+
enableGraph?: boolean | undefined;
|
|
326
|
+
graphStore?: {
|
|
327
|
+
provider: string;
|
|
328
|
+
config: {
|
|
329
|
+
url: string;
|
|
330
|
+
username: string;
|
|
331
|
+
password: string;
|
|
332
|
+
};
|
|
333
|
+
llm?: {
|
|
334
|
+
provider: string;
|
|
335
|
+
config: Record<string, any>;
|
|
336
|
+
} | undefined;
|
|
337
|
+
customPrompt?: string | undefined;
|
|
338
|
+
} | undefined;
|
|
339
|
+
historyStore?: {
|
|
340
|
+
provider: string;
|
|
341
|
+
config: Record<string, any>;
|
|
342
|
+
} | undefined;
|
|
343
|
+
disableHistory?: boolean | undefined;
|
|
344
|
+
}, {
|
|
345
|
+
embedder: {
|
|
346
|
+
provider: string;
|
|
347
|
+
config: {
|
|
348
|
+
modelProperties?: Record<string, any> | undefined;
|
|
349
|
+
apiKey?: string | undefined;
|
|
350
|
+
model?: any;
|
|
351
|
+
baseURL?: string | undefined;
|
|
352
|
+
embeddingDims?: number | undefined;
|
|
353
|
+
url?: string | undefined;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
vectorStore: {
|
|
357
|
+
provider: string;
|
|
358
|
+
config: {
|
|
359
|
+
collectionName?: string | undefined;
|
|
360
|
+
dimension?: number | undefined;
|
|
361
|
+
dbPath?: string | undefined;
|
|
362
|
+
client?: any;
|
|
363
|
+
} & {
|
|
364
|
+
[k: string]: unknown;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
llm: {
|
|
368
|
+
provider: string;
|
|
369
|
+
config: {
|
|
370
|
+
modelProperties?: Record<string, any> | undefined;
|
|
371
|
+
apiKey?: string | undefined;
|
|
372
|
+
model?: any;
|
|
373
|
+
baseURL?: string | undefined;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
version?: string | undefined;
|
|
377
|
+
historyDbPath?: string | undefined;
|
|
378
|
+
customPrompt?: string | undefined;
|
|
379
|
+
enableGraph?: boolean | undefined;
|
|
380
|
+
graphStore?: {
|
|
381
|
+
provider: string;
|
|
382
|
+
config: {
|
|
383
|
+
url: string;
|
|
384
|
+
username: string;
|
|
385
|
+
password: string;
|
|
386
|
+
};
|
|
387
|
+
llm?: {
|
|
388
|
+
provider: string;
|
|
389
|
+
config: Record<string, any>;
|
|
390
|
+
} | undefined;
|
|
391
|
+
customPrompt?: string | undefined;
|
|
392
|
+
} | undefined;
|
|
393
|
+
historyStore?: {
|
|
394
|
+
provider: string;
|
|
395
|
+
config: Record<string, any>;
|
|
396
|
+
} | undefined;
|
|
397
|
+
disableHistory?: boolean | undefined;
|
|
398
|
+
}>;
|
|
399
|
+
|
|
400
|
+
interface Entity {
|
|
401
|
+
userId?: string;
|
|
402
|
+
agentId?: string;
|
|
403
|
+
runId?: string;
|
|
404
|
+
}
|
|
405
|
+
interface AddMemoryOptions extends Entity {
|
|
406
|
+
metadata?: Record<string, any>;
|
|
407
|
+
filters?: SearchFilters;
|
|
408
|
+
infer?: boolean;
|
|
409
|
+
}
|
|
410
|
+
interface SearchMemoryOptions extends Entity {
|
|
411
|
+
limit?: number;
|
|
412
|
+
filters?: SearchFilters;
|
|
413
|
+
}
|
|
414
|
+
interface GetAllMemoryOptions extends Entity {
|
|
415
|
+
limit?: number;
|
|
416
|
+
}
|
|
417
|
+
interface DeleteAllMemoryOptions extends Entity {
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
declare class Memory {
|
|
421
|
+
private config;
|
|
422
|
+
private customPrompt;
|
|
423
|
+
private embedder;
|
|
424
|
+
private vectorStore;
|
|
425
|
+
private llm;
|
|
426
|
+
private db;
|
|
427
|
+
private collectionName;
|
|
428
|
+
private apiVersion;
|
|
429
|
+
private graphMemory?;
|
|
430
|
+
private enableGraph;
|
|
431
|
+
telemetryId: string;
|
|
432
|
+
private _initPromise;
|
|
433
|
+
private _initError?;
|
|
434
|
+
constructor(config?: Partial<MemoryConfig>);
|
|
435
|
+
/**
|
|
436
|
+
* If no explicit dimension was provided, runs a probe embedding to
|
|
437
|
+
* detect it. Then creates and initializes the vector store.
|
|
438
|
+
*/
|
|
439
|
+
private _autoInitialize;
|
|
440
|
+
/**
|
|
441
|
+
* Ensures that auto-initialization (dimension detection + vector store
|
|
442
|
+
* creation) has completed before any public method proceeds.
|
|
443
|
+
* If a previous init attempt failed, retries automatically.
|
|
444
|
+
*/
|
|
445
|
+
private _ensureInitialized;
|
|
446
|
+
private _initializeTelemetry;
|
|
447
|
+
private _getTelemetryId;
|
|
448
|
+
private _captureEvent;
|
|
449
|
+
static fromConfig(configDict: Record<string, any>): Memory;
|
|
450
|
+
add(messages: string | Message[], config: AddMemoryOptions): Promise<SearchResult>;
|
|
451
|
+
private addToVectorStore;
|
|
452
|
+
get(memoryId: string): Promise<MemoryItem | null>;
|
|
453
|
+
search(query: string, config: SearchMemoryOptions): Promise<SearchResult>;
|
|
454
|
+
update(memoryId: string, data: string): Promise<{
|
|
455
|
+
message: string;
|
|
456
|
+
}>;
|
|
457
|
+
delete(memoryId: string): Promise<{
|
|
458
|
+
message: string;
|
|
459
|
+
}>;
|
|
460
|
+
deleteAll(config: DeleteAllMemoryOptions): Promise<{
|
|
461
|
+
message: string;
|
|
462
|
+
}>;
|
|
463
|
+
history(memoryId: string): Promise<any[]>;
|
|
464
|
+
reset(): Promise<void>;
|
|
465
|
+
getAll(config: GetAllMemoryOptions): Promise<SearchResult>;
|
|
466
|
+
private createMemory;
|
|
467
|
+
private updateMemory;
|
|
468
|
+
private deleteMemory;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
interface Embedder {
|
|
472
|
+
embed(text: string): Promise<number[]>;
|
|
473
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
declare class OpenAIEmbedder implements Embedder {
|
|
477
|
+
private openai;
|
|
478
|
+
private model;
|
|
479
|
+
private embeddingDims?;
|
|
480
|
+
constructor(config: EmbeddingConfig);
|
|
481
|
+
embed(text: string): Promise<number[]>;
|
|
482
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
declare class OllamaEmbedder implements Embedder {
|
|
486
|
+
private ollama;
|
|
487
|
+
private model;
|
|
488
|
+
private embeddingDims?;
|
|
489
|
+
private initialized;
|
|
490
|
+
constructor(config: EmbeddingConfig);
|
|
491
|
+
embed(text: string): Promise<number[]>;
|
|
492
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
493
|
+
private ensureModelExists;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
declare class GoogleEmbedder implements Embedder {
|
|
497
|
+
private google;
|
|
498
|
+
private model;
|
|
499
|
+
private embeddingDims?;
|
|
500
|
+
constructor(config: EmbeddingConfig);
|
|
501
|
+
embed(text: string): Promise<number[]>;
|
|
502
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
declare class AzureOpenAIEmbedder implements Embedder {
|
|
506
|
+
private client;
|
|
507
|
+
private model;
|
|
508
|
+
private embeddingDims?;
|
|
509
|
+
constructor(config: EmbeddingConfig);
|
|
510
|
+
embed(text: string): Promise<number[]>;
|
|
511
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
declare class LangchainEmbedder implements Embedder {
|
|
515
|
+
private embedderInstance;
|
|
516
|
+
private batchSize?;
|
|
517
|
+
constructor(config: EmbeddingConfig);
|
|
518
|
+
embed(text: string): Promise<number[]>;
|
|
519
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
interface LLMResponse {
|
|
523
|
+
content: string;
|
|
524
|
+
role: string;
|
|
525
|
+
toolCalls?: Array<{
|
|
526
|
+
name: string;
|
|
527
|
+
arguments: string;
|
|
528
|
+
}>;
|
|
529
|
+
}
|
|
530
|
+
interface LLM {
|
|
531
|
+
generateResponse(messages: Array<{
|
|
532
|
+
role: string;
|
|
533
|
+
content: string;
|
|
534
|
+
}>, response_format?: {
|
|
535
|
+
type: string;
|
|
536
|
+
}, tools?: any[]): Promise<any>;
|
|
537
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
declare class OpenAILLM implements LLM {
|
|
541
|
+
private openai;
|
|
542
|
+
private model;
|
|
543
|
+
constructor(config: LLMConfig);
|
|
544
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
545
|
+
type: string;
|
|
546
|
+
}, tools?: any[]): Promise<string | LLMResponse>;
|
|
547
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare class GoogleLLM implements LLM {
|
|
551
|
+
private google;
|
|
552
|
+
private model;
|
|
553
|
+
constructor(config: LLMConfig);
|
|
554
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
555
|
+
type: string;
|
|
556
|
+
}, tools?: any[]): Promise<string | LLMResponse>;
|
|
557
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
declare class OpenAIStructuredLLM implements LLM {
|
|
561
|
+
private openai;
|
|
562
|
+
private model;
|
|
563
|
+
constructor(config: LLMConfig);
|
|
564
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
565
|
+
type: string;
|
|
566
|
+
} | null, tools?: any[]): Promise<string | LLMResponse>;
|
|
567
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
declare class AnthropicLLM implements LLM {
|
|
571
|
+
private client;
|
|
572
|
+
private model;
|
|
573
|
+
constructor(config: LLMConfig);
|
|
574
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
575
|
+
type: string;
|
|
576
|
+
}): Promise<string>;
|
|
577
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
declare class GroqLLM implements LLM {
|
|
581
|
+
private client;
|
|
582
|
+
private model;
|
|
583
|
+
constructor(config: LLMConfig);
|
|
584
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
585
|
+
type: string;
|
|
586
|
+
}): Promise<string>;
|
|
587
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare class OllamaLLM implements LLM {
|
|
591
|
+
private ollama;
|
|
592
|
+
private model;
|
|
593
|
+
private initialized;
|
|
594
|
+
constructor(config: LLMConfig);
|
|
595
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
596
|
+
type: string;
|
|
597
|
+
}, tools?: any[]): Promise<string | LLMResponse>;
|
|
598
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
599
|
+
private ensureModelExists;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
declare class MistralLLM implements LLM {
|
|
603
|
+
private client;
|
|
604
|
+
private model;
|
|
605
|
+
constructor(config: LLMConfig);
|
|
606
|
+
private contentToString;
|
|
607
|
+
generateResponse(messages: Message[], responseFormat?: {
|
|
608
|
+
type: string;
|
|
609
|
+
}, tools?: any[]): Promise<string | LLMResponse>;
|
|
610
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
declare class LangchainLLM implements LLM {
|
|
614
|
+
private llmInstance;
|
|
615
|
+
private modelName;
|
|
616
|
+
constructor(config: LLMConfig);
|
|
617
|
+
generateResponse(messages: Message[], response_format?: {
|
|
618
|
+
type: string;
|
|
619
|
+
}, tools?: any[]): Promise<string | LLMResponse>;
|
|
620
|
+
generateChat(messages: Message[]): Promise<LLMResponse>;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
interface VectorStore {
|
|
624
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
625
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
626
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
627
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
628
|
+
delete(vectorId: string): Promise<void>;
|
|
629
|
+
deleteCol(): Promise<void>;
|
|
630
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
631
|
+
getUserId(): Promise<string>;
|
|
632
|
+
setUserId(userId: string): Promise<void>;
|
|
633
|
+
initialize(): Promise<void>;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
declare class MemoryVectorStore implements VectorStore {
|
|
637
|
+
private db;
|
|
638
|
+
private dimension;
|
|
639
|
+
private dbPath;
|
|
640
|
+
constructor(config: VectorStoreConfig);
|
|
641
|
+
private init;
|
|
642
|
+
private cosineSimilarity;
|
|
643
|
+
private filterVector;
|
|
644
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
645
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
646
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
647
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
648
|
+
delete(vectorId: string): Promise<void>;
|
|
649
|
+
deleteCol(): Promise<void>;
|
|
650
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
651
|
+
getUserId(): Promise<string>;
|
|
652
|
+
setUserId(userId: string): Promise<void>;
|
|
653
|
+
initialize(): Promise<void>;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
interface QdrantConfig extends VectorStoreConfig {
|
|
657
|
+
client?: QdrantClient;
|
|
658
|
+
host?: string;
|
|
659
|
+
port?: number;
|
|
660
|
+
path?: string;
|
|
661
|
+
url?: string;
|
|
662
|
+
apiKey?: string;
|
|
663
|
+
onDisk?: boolean;
|
|
664
|
+
collectionName: string;
|
|
665
|
+
embeddingModelDims: number;
|
|
666
|
+
dimension?: number;
|
|
667
|
+
}
|
|
668
|
+
declare class Qdrant implements VectorStore {
|
|
669
|
+
private client;
|
|
670
|
+
private readonly collectionName;
|
|
671
|
+
private dimension;
|
|
672
|
+
private _initPromise?;
|
|
673
|
+
constructor(config: QdrantConfig);
|
|
674
|
+
private createFilter;
|
|
675
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
676
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
677
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
678
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
679
|
+
delete(vectorId: string): Promise<void>;
|
|
680
|
+
deleteCol(): Promise<void>;
|
|
681
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
682
|
+
private generateUUID;
|
|
683
|
+
getUserId(): Promise<string>;
|
|
684
|
+
setUserId(userId: string): Promise<void>;
|
|
685
|
+
private ensureCollection;
|
|
686
|
+
initialize(): Promise<void>;
|
|
687
|
+
private _doInitialize;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
interface RedisConfig extends VectorStoreConfig {
|
|
691
|
+
redisUrl: string;
|
|
692
|
+
collectionName: string;
|
|
693
|
+
embeddingModelDims: number;
|
|
694
|
+
username?: string;
|
|
695
|
+
password?: string;
|
|
696
|
+
}
|
|
697
|
+
declare class RedisDB implements VectorStore {
|
|
698
|
+
private client;
|
|
699
|
+
private readonly indexName;
|
|
700
|
+
private readonly indexPrefix;
|
|
701
|
+
private readonly schema;
|
|
702
|
+
private _initPromise?;
|
|
703
|
+
constructor(config: RedisConfig);
|
|
704
|
+
private createIndex;
|
|
705
|
+
initialize(): Promise<void>;
|
|
706
|
+
private _doInitialize;
|
|
707
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
708
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
709
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
710
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
711
|
+
delete(vectorId: string): Promise<void>;
|
|
712
|
+
deleteCol(): Promise<void>;
|
|
713
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
714
|
+
close(): Promise<void>;
|
|
715
|
+
getUserId(): Promise<string>;
|
|
716
|
+
setUserId(userId: string): Promise<void>;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
interface SupabaseConfig extends VectorStoreConfig {
|
|
720
|
+
supabaseUrl: string;
|
|
721
|
+
supabaseKey: string;
|
|
722
|
+
tableName: string;
|
|
723
|
+
embeddingColumnName?: string;
|
|
724
|
+
metadataColumnName?: string;
|
|
725
|
+
}
|
|
726
|
+
declare class SupabaseDB implements VectorStore {
|
|
727
|
+
private client;
|
|
728
|
+
private readonly tableName;
|
|
729
|
+
private readonly embeddingColumnName;
|
|
730
|
+
private readonly metadataColumnName;
|
|
731
|
+
private _initPromise?;
|
|
732
|
+
constructor(config: SupabaseConfig);
|
|
733
|
+
initialize(): Promise<void>;
|
|
734
|
+
private _doInitialize;
|
|
735
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
736
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
737
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
738
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
739
|
+
delete(vectorId: string): Promise<void>;
|
|
740
|
+
deleteCol(): Promise<void>;
|
|
741
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
742
|
+
getUserId(): Promise<string>;
|
|
743
|
+
setUserId(userId: string): Promise<void>;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
interface LangchainStoreConfig extends VectorStoreConfig {
|
|
747
|
+
client: VectorStore$1;
|
|
748
|
+
}
|
|
749
|
+
declare class LangchainVectorStore implements VectorStore {
|
|
750
|
+
private lcStore;
|
|
751
|
+
private dimension?;
|
|
752
|
+
private storeUserId;
|
|
753
|
+
constructor(config: LangchainStoreConfig);
|
|
754
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
755
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
756
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
757
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
758
|
+
delete(vectorId: string): Promise<void>;
|
|
759
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
760
|
+
deleteCol(): Promise<void>;
|
|
761
|
+
getUserId(): Promise<string>;
|
|
762
|
+
setUserId(userId: string): Promise<void>;
|
|
763
|
+
initialize(): Promise<void>;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
interface VectorizeConfig extends VectorStoreConfig {
|
|
767
|
+
apiKey?: string;
|
|
768
|
+
indexName: string;
|
|
769
|
+
accountId: string;
|
|
770
|
+
}
|
|
771
|
+
declare class VectorizeDB implements VectorStore {
|
|
772
|
+
private client;
|
|
773
|
+
private dimensions;
|
|
774
|
+
private indexName;
|
|
775
|
+
private accountId;
|
|
776
|
+
private _initPromise?;
|
|
777
|
+
constructor(config: VectorizeConfig);
|
|
778
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
779
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
780
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
781
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
782
|
+
delete(vectorId: string): Promise<void>;
|
|
783
|
+
deleteCol(): Promise<void>;
|
|
784
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
785
|
+
private generateUUID;
|
|
786
|
+
getUserId(): Promise<string>;
|
|
787
|
+
setUserId(userId: string): Promise<void>;
|
|
788
|
+
initialize(): Promise<void>;
|
|
789
|
+
private _doInitialize;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Configuration interface for Azure AI Search vector store
|
|
794
|
+
*/
|
|
795
|
+
interface AzureAISearchConfig extends VectorStoreConfig {
|
|
796
|
+
/**
|
|
797
|
+
* Azure AI Search service name (e.g., "my-search-service")
|
|
798
|
+
*/
|
|
799
|
+
serviceName: string;
|
|
800
|
+
/**
|
|
801
|
+
* Index/collection name to use
|
|
802
|
+
*/
|
|
803
|
+
collectionName: string;
|
|
804
|
+
/**
|
|
805
|
+
* API key for authentication (if not provided, uses DefaultAzureCredential)
|
|
806
|
+
*/
|
|
807
|
+
apiKey?: string;
|
|
808
|
+
/**
|
|
809
|
+
* Vector embedding dimensions
|
|
810
|
+
*/
|
|
811
|
+
embeddingModelDims: number;
|
|
812
|
+
/**
|
|
813
|
+
* Compression type: 'none', 'scalar', or 'binary'
|
|
814
|
+
* @default 'none'
|
|
815
|
+
*/
|
|
816
|
+
compressionType?: "none" | "scalar" | "binary";
|
|
817
|
+
/**
|
|
818
|
+
* Use half precision (float16) instead of full precision (float32)
|
|
819
|
+
* @default false
|
|
820
|
+
*/
|
|
821
|
+
useFloat16?: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* Enable hybrid search (combines vector + text search)
|
|
824
|
+
* @default false
|
|
825
|
+
*/
|
|
826
|
+
hybridSearch?: boolean;
|
|
827
|
+
/**
|
|
828
|
+
* Vector filter mode: 'preFilter' or 'postFilter'
|
|
829
|
+
* @default 'preFilter'
|
|
830
|
+
*/
|
|
831
|
+
vectorFilterMode?: string;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Azure AI Search vector store implementation
|
|
835
|
+
* Supports vector search with hybrid search, compression, and filtering
|
|
836
|
+
*/
|
|
837
|
+
declare class AzureAISearch implements VectorStore {
|
|
838
|
+
private searchClient;
|
|
839
|
+
private indexClient;
|
|
840
|
+
private readonly serviceName;
|
|
841
|
+
private readonly indexName;
|
|
842
|
+
private readonly embeddingModelDims;
|
|
843
|
+
private readonly compressionType;
|
|
844
|
+
private readonly useFloat16;
|
|
845
|
+
private readonly hybridSearch;
|
|
846
|
+
private readonly vectorFilterMode;
|
|
847
|
+
private readonly apiKey;
|
|
848
|
+
private _initPromise?;
|
|
849
|
+
constructor(config: AzureAISearchConfig);
|
|
850
|
+
/**
|
|
851
|
+
* Initialize the Azure AI Search index if it doesn't exist
|
|
852
|
+
*/
|
|
853
|
+
initialize(): Promise<void>;
|
|
854
|
+
private _doInitialize;
|
|
855
|
+
/**
|
|
856
|
+
* Create a new index in Azure AI Search
|
|
857
|
+
*/
|
|
858
|
+
private createCol;
|
|
859
|
+
/**
|
|
860
|
+
* Generate a document for insertion
|
|
861
|
+
*/
|
|
862
|
+
private generateDocument;
|
|
863
|
+
/**
|
|
864
|
+
* Insert vectors into the index
|
|
865
|
+
*/
|
|
866
|
+
insert(vectors: number[][], ids: string[], payloads: Record<string, any>[]): Promise<void>;
|
|
867
|
+
/**
|
|
868
|
+
* Sanitize filter keys to remove non-alphanumeric characters
|
|
869
|
+
*/
|
|
870
|
+
private sanitizeKey;
|
|
871
|
+
/**
|
|
872
|
+
* Build OData filter expression from SearchFilters
|
|
873
|
+
*/
|
|
874
|
+
private buildFilterExpression;
|
|
875
|
+
/**
|
|
876
|
+
* Extract JSON from payload string
|
|
877
|
+
* Handles cases where payload might have extra text
|
|
878
|
+
*/
|
|
879
|
+
private extractJson;
|
|
880
|
+
/**
|
|
881
|
+
* Search for similar vectors
|
|
882
|
+
*/
|
|
883
|
+
search(query: number[], limit?: number, filters?: SearchFilters): Promise<VectorStoreResult[]>;
|
|
884
|
+
/**
|
|
885
|
+
* Delete a vector by ID
|
|
886
|
+
*/
|
|
887
|
+
delete(vectorId: string): Promise<void>;
|
|
888
|
+
/**
|
|
889
|
+
* Update a vector and its payload
|
|
890
|
+
*/
|
|
891
|
+
update(vectorId: string, vector: number[], payload: Record<string, any>): Promise<void>;
|
|
892
|
+
/**
|
|
893
|
+
* Retrieve a vector by ID
|
|
894
|
+
*/
|
|
895
|
+
get(vectorId: string): Promise<VectorStoreResult | null>;
|
|
896
|
+
/**
|
|
897
|
+
* List all collections (indexes)
|
|
898
|
+
*/
|
|
899
|
+
private listCols;
|
|
900
|
+
/**
|
|
901
|
+
* Delete the index
|
|
902
|
+
*/
|
|
903
|
+
deleteCol(): Promise<void>;
|
|
904
|
+
/**
|
|
905
|
+
* Get information about the index
|
|
906
|
+
*/
|
|
907
|
+
private colInfo;
|
|
908
|
+
/**
|
|
909
|
+
* List all vectors in the index
|
|
910
|
+
*/
|
|
911
|
+
list(filters?: SearchFilters, limit?: number): Promise<[VectorStoreResult[], number]>;
|
|
912
|
+
/**
|
|
913
|
+
* Generate a random user ID
|
|
914
|
+
*/
|
|
915
|
+
private generateUUID;
|
|
916
|
+
/**
|
|
917
|
+
* Get user ID from memory_migrations collection
|
|
918
|
+
* Required by VectorStore interface
|
|
919
|
+
*/
|
|
920
|
+
getUserId(): Promise<string>;
|
|
921
|
+
/**
|
|
922
|
+
* Set user ID in memory_migrations collection
|
|
923
|
+
* Required by VectorStore interface
|
|
924
|
+
*/
|
|
925
|
+
setUserId(userId: string): Promise<void>;
|
|
926
|
+
/**
|
|
927
|
+
* Reset the index by deleting and recreating it
|
|
928
|
+
*/
|
|
929
|
+
reset(): Promise<void>;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
interface HistoryManager {
|
|
933
|
+
addHistory(memoryId: string, previousValue: string | null, newValue: string | null, action: string, createdAt?: string, updatedAt?: string, isDeleted?: number): Promise<void>;
|
|
934
|
+
getHistory(memoryId: string): Promise<any[]>;
|
|
935
|
+
reset(): Promise<void>;
|
|
936
|
+
close(): void;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
declare class EmbedderFactory {
|
|
940
|
+
static create(provider: string, config: EmbeddingConfig): Embedder;
|
|
941
|
+
}
|
|
942
|
+
declare class LLMFactory {
|
|
943
|
+
static create(provider: string, config: LLMConfig): LLM;
|
|
944
|
+
}
|
|
945
|
+
declare class VectorStoreFactory {
|
|
946
|
+
static create(provider: string, config: VectorStoreConfig): VectorStore;
|
|
947
|
+
}
|
|
948
|
+
declare class HistoryManagerFactory {
|
|
949
|
+
static create(provider: string, config: HistoryStoreConfig): HistoryManager;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
export { type AddMemoryOptions, AnthropicLLM, AzureAISearch, 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 };
|