mem0ai 2.1.26 → 2.1.28

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.
@@ -36,6 +36,7 @@ interface HistoryStoreConfig {
36
36
  }
37
37
  interface LLMConfig {
38
38
  provider?: string;
39
+ baseURL?: string;
39
40
  config?: Record<string, any>;
40
41
  apiKey?: string;
41
42
  model?: string | any;
@@ -36,6 +36,7 @@ interface HistoryStoreConfig {
36
36
  }
37
37
  interface LLMConfig {
38
38
  provider?: string;
39
+ baseURL?: string;
39
40
  config?: Record<string, any>;
40
41
  apiKey?: string;
41
42
  model?: string | any;
package/dist/oss/index.js CHANGED
@@ -193,7 +193,10 @@ var OllamaEmbedder = class {
193
193
  var import_openai2 = __toESM(require("openai"));
194
194
  var OpenAILLM = class {
195
195
  constructor(config) {
196
- this.openai = new import_openai2.default({ apiKey: config.apiKey });
196
+ this.openai = new import_openai2.default({
197
+ apiKey: config.apiKey,
198
+ baseURL: config.baseURL
199
+ });
197
200
  this.model = config.model || "gpt-4o-mini";
198
201
  }
199
202
  async generateResponse(messages, responseFormat, tools) {
@@ -2857,6 +2860,7 @@ var DEFAULT_MEMORY_CONFIG = {
2857
2860
  llm: {
2858
2861
  provider: "openai",
2859
2862
  config: {
2863
+ baseURL: "https://api.openai.com/v1",
2860
2864
  apiKey: process.env.OPENAI_API_KEY || "",
2861
2865
  model: "gpt-4-turbo-preview",
2862
2866
  modelProperties: void 0
@@ -2953,6 +2957,7 @@ var ConfigManager = class {
2953
2957
  finalModel = userConf.model;
2954
2958
  }
2955
2959
  return {
2960
+ baseURL: (userConf == null ? void 0 : userConf.baseURL) || defaultConf.baseURL,
2956
2961
  apiKey: (userConf == null ? void 0 : userConf.apiKey) !== void 0 ? userConf.apiKey : defaultConf.apiKey,
2957
2962
  model: finalModel,
2958
2963
  modelProperties: (userConf == null ? void 0 : userConf.modelProperties) !== void 0 ? userConf.modelProperties : defaultConf.modelProperties