-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to use a tag to insert the current datetime in prompts #3697
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4e6cce7
to
46b17e0
Compare
@@ -51,7 +51,7 @@ prompts: | |||
- name: "OnlyLLM" | |||
description: "Chat directly with the LLM!" | |||
system: > | |||
You are a helpful AI assistant. The current date is DANSWER_DATETIME_REPLACEMENT | |||
You are a helpful AI assistant. The current date is [[CURRENT_DATETIME]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any migration issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -31,15 +31,14 @@ def default_build_system_message( | |||
prompt_config: PromptConfig, | |||
) -> SystemMessage | None: | |||
system_prompt = prompt_config.system_prompt.strip() | |||
if prompt_config.datetime_aware: | |||
system_prompt = add_date_time_to_prompt(prompt_str=system_prompt) | |||
tag_handled_prompt = handle_onyx_date_awareness( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does tag handled mean?
84964ca
to
fa2ac14
Compare
fa2ac14
to
82b606d
Compare
Description
https://linear.app/danswer/issue/DAN-1309/add-datetime-to-assistant-page
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.