Mem0 1.0.0 (#3545)

This commit is contained in:
Parshva Daftari
2025-10-16 15:50:20 +05:30
committed by GitHub
parent 8f5151c344
commit 394203d1b5
77 changed files with 3445 additions and 990 deletions
+6 -1
View File
@@ -242,7 +242,12 @@ export class Memory {
const parsedMessages = messages.map((m) => m.content).join("\n");
const [systemPrompt, userPrompt] = this.customPrompt
? [this.customPrompt, `Input:\n${parsedMessages}`]
? [
this.customPrompt.toLowerCase().includes("json")
? this.customPrompt
: `${this.customPrompt}\n\nYou MUST return a valid JSON object with a 'facts' key containing an array of strings.`,
`Input:\n${parsedMessages}`,
]
: getFactRetrievalMessages(parsedMessages);
const response = await this.llm.generateResponse(