mem0ai 2.1.0 → 2.1.2

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
@@ -27,9 +27,15 @@ declare enum API_VERSION {
27
27
  V1 = "v1",
28
28
  V2 = "v2"
29
29
  }
30
+ interface MultiModalMessages {
31
+ type: "image_url";
32
+ image_url: {
33
+ url: string;
34
+ };
35
+ }
30
36
  interface Messages {
31
37
  role: string;
32
- content: string;
38
+ content: string | MultiModalMessages;
33
39
  }
34
40
  interface Message extends Messages {
35
41
  }
@@ -164,15 +170,9 @@ declare class MemoryClient {
164
170
  private _initializeClient;
165
171
  wrapMethod(methodName: any, method: any): (...args: any) => Promise<any>;
166
172
  _fetchWithErrorHandling(url: string, options: any): Promise<any>;
167
- _preparePayload(messages: string | Array<{
168
- role: string;
169
- content: string;
170
- }>, options: MemoryOptions): object;
173
+ _preparePayload(messages: string | Array<Message>, options: MemoryOptions): object;
171
174
  _prepareParams(options: MemoryOptions): object;
172
- add(messages: string | Array<{
173
- role: string;
174
- content: string;
175
- }>, options?: MemoryOptions): Promise<Array<Memory>>;
175
+ add(messages: string | Array<Message>, options?: MemoryOptions): Promise<Array<Memory>>;
176
176
  update(memoryId: string, message: string): Promise<Array<Memory>>;
177
177
  get(memoryId: string): Promise<Memory>;
178
178
  getAll(options?: SearchOptions): Promise<Array<Memory>>;
package/dist/index.d.ts CHANGED
@@ -27,9 +27,15 @@ declare enum API_VERSION {
27
27
  V1 = "v1",
28
28
  V2 = "v2"
29
29
  }
30
+ interface MultiModalMessages {
31
+ type: "image_url";
32
+ image_url: {
33
+ url: string;
34
+ };
35
+ }
30
36
  interface Messages {
31
37
  role: string;
32
- content: string;
38
+ content: string | MultiModalMessages;
33
39
  }
34
40
  interface Message extends Messages {
35
41
  }
@@ -164,15 +170,9 @@ declare class MemoryClient {
164
170
  private _initializeClient;
165
171
  wrapMethod(methodName: any, method: any): (...args: any) => Promise<any>;
166
172
  _fetchWithErrorHandling(url: string, options: any): Promise<any>;
167
- _preparePayload(messages: string | Array<{
168
- role: string;
169
- content: string;
170
- }>, options: MemoryOptions): object;
173
+ _preparePayload(messages: string | Array<Message>, options: MemoryOptions): object;
171
174
  _prepareParams(options: MemoryOptions): object;
172
- add(messages: string | Array<{
173
- role: string;
174
- content: string;
175
- }>, options?: MemoryOptions): Promise<Array<Memory>>;
175
+ add(messages: string | Array<Message>, options?: MemoryOptions): Promise<Array<Memory>>;
176
176
  update(memoryId: string, message: string): Promise<Array<Memory>>;
177
177
  get(memoryId: string): Promise<Memory>;
178
178
  getAll(options?: SearchOptions): Promise<Array<Memory>>;
package/dist/index.js CHANGED
@@ -4344,7 +4344,7 @@ var import_axios = __toESM(require("axios"));
4344
4344
 
4345
4345
  // src/client/telemetry.browser.ts
4346
4346
  var version = "1.0.20";
4347
- var MEM0_TELEMETRY = process.env.MEM0_TELEMETRY !== "false";
4347
+ var MEM0_TELEMETRY = true;
4348
4348
  var POSTHOG_API_KEY = "phc_hgJkUVJFYtmaJqrvf6CYN67TIQ8yhXAkWzUn9AMU4yX";
4349
4349
  var POSTHOG_HOST = "https://us.i.posthog.com";
4350
4350
  async function generateHash(input) {