Skip to content

Commit

Permalink
tweak memorize feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Leask committed Jul 24, 2024
1 parent 49c28b0 commit a1f4d6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const memorize = async (ctx) => {
received_text, response_text, ...collected.map(x => x.content)
])),
};
await ignoreErrFunc(async () => {
return await ignoreErrFunc(async () => {
event.distilled_vector = bot._.embedding
? await bot._.embedding(event.distilled) : [];
switch (bot._.database.provider) {
Expand All @@ -297,7 +297,7 @@ const memorize = async (ctx) => {
break;
}
await bot._.database?.client?.upsert?.(table, event, { skipEcho: true });
bot._.memorize && await bot._.memorize(event);
return bot._.memorize && await bot._.memorize(event);
}, logOptions);
};

Expand Down

0 comments on commit a1f4d6a

Please sign in to comment.