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 currentDate variable to Dynamic Prompt #1648

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

evalstate
Copy link
Contributor

Allow the use of {{currentDate}} in an assistant Dynamic Prompt, which inserts the date in the format "Tuesday, 14 January 2025".

Not sure if anyone else wants this? - and implementation could probably be more robust (e.g. able to use from normal system prompts, not require ASSISTANT_RAG). Happy to take guidance on improving implementation.

@nsarrazin nsarrazin self-requested a review January 16, 2025 08:25
@nsarrazin nsarrazin self-assigned this Jan 16, 2025
@nsarrazin
Copy link
Collaborator

Hi, I think this is a handy addition, I'll test it to be sure it works well but I like the idea.

Maybe long-term I'll move the preprompt processing from being assistant specific to a more generic spot indeed so it can be used with model system prompts as well, that would be nice.

Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the tag to {{today}} but other than that the feature works great, thanks for the contrib!

@nsarrazin nsarrazin merged commit b493e99 into huggingface:main Jan 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants