Suggestion to Add Date & Time in Vapi System Promp...
# support
s
Hi @Vapi Team, Could you consider adding the current date and time to the vapi system prompt? As I observed the assistant gives the wrong date, and this small change could improve accuracy for time-based queries.
h
its already there Today is {{ "now" | date: "%A", "Asia/Kolkata" }} The current date is {{ "now" | date: "%B %d, %Y", "Asia/Kolkata" }} The call started at {{ "now" | date: "%I:%M %p", "Asia/Kolkata" }}
like this
s
Hi @hxrdxk I tried a call
Call ID : 02d24836-5d38-4e77-add0-219456f5ee37
jst a few minutes back and asked the assistant for today's date it replied "June twelfth 20 24". Can you please check why is this happening ?
s
The {{"now" | date: "%A, %B %d, %Y, %I:%M %p", "Europe/Berlin"}} - format suddenly stopped working for me after several months. I then built a tool that provided the correct date. During testing, I realized that {{now}} works on its own and I can also get the correct time via {{"now" | date: "%H:%M", "Europe/Berlin"}} without any problems. The problem only occurs when I try to use the date with a European time zone. I then entered "The current date is {{now}}. Time is {{"now" | date: "%H:%M", "Europe/Berlin"}}" and it works again. Maybe you're experiencing the same issue?
c
Hey Sahil! I just looked into the shared call ID. Its call log. You are not using the datetime variables anyway. If you look at your prompt, the values are not replaced with the actual variable, so that means it's not being used. So I'll suggest you take a look at the datetime variables inside your prompt again and then try. Let me know how it goes for you.
s
Oh, I thought the system prompt in VAPI already included the current date and time, so I didn't think we needed to add it ourselves. But if that's not the case, I'll add it manually