Skip to content

Commit

Permalink
Add current date to system prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Nov 15, 2024
1 parent 9f8dc70 commit 27945b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/openAI.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const config = require('../config')
const { AzureOpenAI } = require('openai');
const moment = require("moment");


const getClient = () => {
Expand Down Expand Up @@ -106,6 +107,7 @@ async function askAssistant(message, username) {
assistantThread.id,
{
assistant_id: assistantResponse.id,
additional_instructions: `Today's date: ${moment().tz('Europe/Madrid').format('MMMM Do YYYY, h:mm:ss a')}`
}
);

Expand Down

0 comments on commit 27945b4

Please sign in to comment.