-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Standardize Chat Prompt Templates to Use Jinja Format #1525
Comments
This is a good idea! It would be a breaking change though so we could keep handlebars as a fallback if the jinja evaluator fails, wdyt? |
@nsarrazin Sure, I agree with your suggestion. Keeping Handlebars as a fallback in case the Jinja evaluator fails is a good approach to ensure backward compatibility and smooth transition. |
yep, seems like the field has standardized on Jinja in the past year 😁 cc @Rocketknight1 😮 |
Please don't fire me, I know you liked Handlebars! 😰 (but yes transitioning to Jinja is definitely the right decision) |
cements that we're a Python-first company (and community) i guess 😁 |
hey guys, did you add this feature? |
@varad0309 the recommended way for now would be to set |
@nsarrazin , thanks for the fast reply. Is there a way to do the same if we have a local model? |
Describe your feature request
Currently, the
chatPromptTemplate
for each model that can be set in env uses Handlebars format. However, thechat_prompt
in the actual model'stokenizer_config.json
uses Jinja format. This inconsistency is causing significant inconvenience. Since Jinja is widely used and preferred, it would be beneficial to standardize on Jinja format for bothchatPromptTemplate
andchat_prompt
. This will improve consistency and ease of use for developers.Screenshots (if relevant)
Implementation idea
To implement this change, the following steps can be taken:
Update Codebase: Update the codebase to handle Jinja templates for
chatPromptTemplate
.Documentation: Update the documentation to reflect this change and provide examples of how to use Jinja templates.
Testing: Thoroughly test the changes to ensure compatibility and that all existing templates work correctly with the new format.
The text was updated successfully, but these errors were encountered: