mem0ai 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oss/index.d.mts +8 -0
- package/dist/oss/index.d.ts +8 -0
- package/dist/oss/index.js +5 -4
- package/dist/oss/index.js.map +1 -1
- package/dist/oss/index.mjs +5 -4
- package/dist/oss/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/oss/index.d.mts
CHANGED
|
@@ -40,6 +40,7 @@ interface HistoryStoreConfig {
|
|
|
40
40
|
interface LLMConfig {
|
|
41
41
|
provider?: string;
|
|
42
42
|
baseURL?: string;
|
|
43
|
+
url?: string;
|
|
43
44
|
config?: Record<string, any>;
|
|
44
45
|
apiKey?: string;
|
|
45
46
|
model?: string | any;
|
|
@@ -194,16 +195,19 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
194
195
|
model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
|
|
195
196
|
modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
196
197
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
198
|
+
url: z.ZodOptional<z.ZodString>;
|
|
197
199
|
}, "strip", z.ZodTypeAny, {
|
|
198
200
|
modelProperties?: Record<string, any> | undefined;
|
|
199
201
|
apiKey?: string | undefined;
|
|
200
202
|
model?: any;
|
|
201
203
|
baseURL?: string | undefined;
|
|
204
|
+
url?: string | undefined;
|
|
202
205
|
}, {
|
|
203
206
|
modelProperties?: Record<string, any> | undefined;
|
|
204
207
|
apiKey?: string | undefined;
|
|
205
208
|
model?: any;
|
|
206
209
|
baseURL?: string | undefined;
|
|
210
|
+
url?: string | undefined;
|
|
207
211
|
}>;
|
|
208
212
|
}, "strip", z.ZodTypeAny, {
|
|
209
213
|
provider: string;
|
|
@@ -212,6 +216,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
212
216
|
apiKey?: string | undefined;
|
|
213
217
|
model?: any;
|
|
214
218
|
baseURL?: string | undefined;
|
|
219
|
+
url?: string | undefined;
|
|
215
220
|
};
|
|
216
221
|
}, {
|
|
217
222
|
provider: string;
|
|
@@ -220,6 +225,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
220
225
|
apiKey?: string | undefined;
|
|
221
226
|
model?: any;
|
|
222
227
|
baseURL?: string | undefined;
|
|
228
|
+
url?: string | undefined;
|
|
223
229
|
};
|
|
224
230
|
}>;
|
|
225
231
|
historyDbPath: z.ZodOptional<z.ZodString>;
|
|
@@ -317,6 +323,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
317
323
|
apiKey?: string | undefined;
|
|
318
324
|
model?: any;
|
|
319
325
|
baseURL?: string | undefined;
|
|
326
|
+
url?: string | undefined;
|
|
320
327
|
};
|
|
321
328
|
};
|
|
322
329
|
version?: string | undefined;
|
|
@@ -371,6 +378,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
371
378
|
apiKey?: string | undefined;
|
|
372
379
|
model?: any;
|
|
373
380
|
baseURL?: string | undefined;
|
|
381
|
+
url?: string | undefined;
|
|
374
382
|
};
|
|
375
383
|
};
|
|
376
384
|
version?: string | undefined;
|
package/dist/oss/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ interface HistoryStoreConfig {
|
|
|
40
40
|
interface LLMConfig {
|
|
41
41
|
provider?: string;
|
|
42
42
|
baseURL?: string;
|
|
43
|
+
url?: string;
|
|
43
44
|
config?: Record<string, any>;
|
|
44
45
|
apiKey?: string;
|
|
45
46
|
model?: string | any;
|
|
@@ -194,16 +195,19 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
194
195
|
model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodAny]>>;
|
|
195
196
|
modelProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
196
197
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
198
|
+
url: z.ZodOptional<z.ZodString>;
|
|
197
199
|
}, "strip", z.ZodTypeAny, {
|
|
198
200
|
modelProperties?: Record<string, any> | undefined;
|
|
199
201
|
apiKey?: string | undefined;
|
|
200
202
|
model?: any;
|
|
201
203
|
baseURL?: string | undefined;
|
|
204
|
+
url?: string | undefined;
|
|
202
205
|
}, {
|
|
203
206
|
modelProperties?: Record<string, any> | undefined;
|
|
204
207
|
apiKey?: string | undefined;
|
|
205
208
|
model?: any;
|
|
206
209
|
baseURL?: string | undefined;
|
|
210
|
+
url?: string | undefined;
|
|
207
211
|
}>;
|
|
208
212
|
}, "strip", z.ZodTypeAny, {
|
|
209
213
|
provider: string;
|
|
@@ -212,6 +216,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
212
216
|
apiKey?: string | undefined;
|
|
213
217
|
model?: any;
|
|
214
218
|
baseURL?: string | undefined;
|
|
219
|
+
url?: string | undefined;
|
|
215
220
|
};
|
|
216
221
|
}, {
|
|
217
222
|
provider: string;
|
|
@@ -220,6 +225,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
220
225
|
apiKey?: string | undefined;
|
|
221
226
|
model?: any;
|
|
222
227
|
baseURL?: string | undefined;
|
|
228
|
+
url?: string | undefined;
|
|
223
229
|
};
|
|
224
230
|
}>;
|
|
225
231
|
historyDbPath: z.ZodOptional<z.ZodString>;
|
|
@@ -317,6 +323,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
317
323
|
apiKey?: string | undefined;
|
|
318
324
|
model?: any;
|
|
319
325
|
baseURL?: string | undefined;
|
|
326
|
+
url?: string | undefined;
|
|
320
327
|
};
|
|
321
328
|
};
|
|
322
329
|
version?: string | undefined;
|
|
@@ -371,6 +378,7 @@ declare const MemoryConfigSchema: z.ZodObject<{
|
|
|
371
378
|
apiKey?: string | undefined;
|
|
372
379
|
model?: any;
|
|
373
380
|
baseURL?: string | undefined;
|
|
381
|
+
url?: string | undefined;
|
|
374
382
|
};
|
|
375
383
|
};
|
|
376
384
|
version?: string | undefined;
|
package/dist/oss/index.js
CHANGED
|
@@ -93,7 +93,8 @@ var MemoryConfigSchema = import_zod.z.object({
|
|
|
93
93
|
apiKey: import_zod.z.string().optional(),
|
|
94
94
|
model: import_zod.z.union([import_zod.z.string(), import_zod.z.any()]).optional(),
|
|
95
95
|
modelProperties: import_zod.z.record(import_zod.z.string(), import_zod.z.any()).optional(),
|
|
96
|
-
baseURL: import_zod.z.string().optional()
|
|
96
|
+
baseURL: import_zod.z.string().optional(),
|
|
97
|
+
url: import_zod.z.string().optional()
|
|
97
98
|
})
|
|
98
99
|
}),
|
|
99
100
|
historyDbPath: import_zod.z.string().optional(),
|
|
@@ -163,7 +164,7 @@ var OllamaEmbedder = class {
|
|
|
163
164
|
// Using this variable to avoid calling the Ollama server multiple times
|
|
164
165
|
this.initialized = false;
|
|
165
166
|
this.ollama = new import_ollama.Ollama({
|
|
166
|
-
host: config.url || "http://localhost:11434"
|
|
167
|
+
host: config.url || config.baseURL || "http://localhost:11434"
|
|
167
168
|
});
|
|
168
169
|
this.model = config.model || "nomic-embed-text:latest";
|
|
169
170
|
this.embeddingDims = config.embeddingDims || 768;
|
|
@@ -1758,9 +1759,8 @@ var OllamaLLM = class {
|
|
|
1758
1759
|
constructor(config) {
|
|
1759
1760
|
// Using this variable to avoid calling the Ollama server multiple times
|
|
1760
1761
|
this.initialized = false;
|
|
1761
|
-
var _a2;
|
|
1762
1762
|
this.ollama = new import_ollama2.Ollama({
|
|
1763
|
-
host:
|
|
1763
|
+
host: config.url || config.baseURL || "http://localhost:11434"
|
|
1764
1764
|
});
|
|
1765
1765
|
this.model = config.model || "llama3.1:8b";
|
|
1766
1766
|
this.ensureModelExists().catch((err) => {
|
|
@@ -3794,6 +3794,7 @@ var ConfigManager = class {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
return {
|
|
3796
3796
|
baseURL: (userConf == null ? void 0 : userConf.baseURL) || defaultConf.baseURL,
|
|
3797
|
+
url: userConf == null ? void 0 : userConf.url,
|
|
3797
3798
|
apiKey: (userConf == null ? void 0 : userConf.apiKey) !== void 0 ? userConf.apiKey : defaultConf.apiKey,
|
|
3798
3799
|
model: finalModel,
|
|
3799
3800
|
modelProperties: (userConf == null ? void 0 : userConf.modelProperties) !== void 0 ? userConf.modelProperties : defaultConf.modelProperties
|