Skip to content

Commit

Permalink
feat: add system clock msg
Browse files Browse the repository at this point in the history
  • Loading branch information
OtacilioN committed Sep 3, 2024
1 parent 9d9a781 commit 09f13f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/processors/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const processAiRun = async ({

export const useAI = async (user: UserSchema, text: string) => {
const threadId = user?.threadId || (await createThread());
const systemClockMsg = `Relógio do Sistema: ${new Date().toLocaleString('pt-BR')}`;
await createMessage(threadId, systemClockMsg);
await createMessage(threadId, text);
const run = await runAssistant(threadId);
const userAiUsageCount = user.aiUsageCount || 0;
Expand Down

0 comments on commit 09f13f1

Please sign in to comment.