mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-09 03:18:04 +00:00
revert and fix mem0 memories addition
This commit is contained in:
parent
1a69d9853d
commit
8c82762b62
1 changed files with 8 additions and 1 deletions
|
|
@ -200,6 +200,12 @@ export async function queue(
|
|||
|
||||
//add to mem0, abstract
|
||||
|
||||
const includeMessages = {
|
||||
note: "information of this user based on the provided note.",
|
||||
tweet: "interests of this user based on a twitter post they are saving.",
|
||||
page: "interests of this user based on a web page they are saving.",
|
||||
};
|
||||
|
||||
const mem0Response = fetch("https://api.mem0.ai/v1/memories/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
|
@ -209,7 +215,7 @@ export async function queue(
|
|||
body: JSON.stringify({
|
||||
messages: [
|
||||
{
|
||||
role: "system",
|
||||
role: "user",
|
||||
content: `Extract information about the user based on this saved content provided, remember that the date was ${new Date().toUTCString()} in utc time zone`,
|
||||
},
|
||||
{
|
||||
|
|
@ -217,6 +223,7 @@ export async function queue(
|
|||
content: vectorData.replace(/<raw>.*?<\/raw>/g, ""),
|
||||
},
|
||||
],
|
||||
includes: includeMessages[type],
|
||||
user_id: body.user,
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue