mem0ai 2.1.0 → 2.1.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/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>>;