Skip to content
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

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
k
yuhongsun96 committed Jan 22, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 79882e156f5dfe84401155455f3c9ce15c23fa6a
4 changes: 3 additions & 1 deletion backend/onyx/chat/prompt_builder/answer_prompt_builder.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,9 @@ def default_build_system_message(
) -> SystemMessage | None:
system_prompt = prompt_config.system_prompt.strip()
tag_handled_prompt = handle_onyx_date_awareness(
Copy link
Contributor

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?

system_prompt, prompt_config, add_additional_info_if_no_tag=True
system_prompt,
prompt_config,
add_additional_info_if_no_tag=prompt_config.datetime_aware,
)

if not tag_handled_prompt: