Mem0 1.0.0 (#3545)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user