-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance datetime handling across timezones
- Provide the AI with the user's local datetime in a consistent format - toLocaleString() outputs dates in formats that confuse LLMs due to some intl date formats being valid US dates - Switch from toLocaleString() to toString() to output a consistent format regardless of locale - New format: `Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)` - Simplify offset prompting and logic - Update system prompt with clearer guidelines for the AI assistant (e.g declaring the source of a datetime) - Only instruct AI to perform UTC conversion for tool calls - Modify example queries to demonstrate proper timezone handling, especially when using relative queries ("in the last 10 minutes...")
- Loading branch information
Showing
1 changed file
with
29 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters