From 27945b47d448f4706b31faffbe4ac84a9fa21e27 Mon Sep 17 00:00:00 2001 From: Lluis Date: Fri, 15 Nov 2024 12:36:08 +0100 Subject: [PATCH] Add current date to system prompt --- services/openAI.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/openAI.js b/services/openAI.js index 7b2a9c1..23dab46 100644 --- a/services/openAI.js +++ b/services/openAI.js @@ -1,5 +1,6 @@ const config = require('../config') const { AzureOpenAI } = require('openai'); +const moment = require("moment"); const getClient = () => { @@ -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')}` } );