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

Add strftime_now to Jinja2 to use with Granite3 models #281

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

mefich
Copy link
Contributor

@mefich mefich commented Feb 13, 2025

Granite3 default template uses strftime_now function.
Currently Jinja2 sandbox raises an exception because strftime_now is undefined and it disables /v1/chat/completions endpoint.

strftime_now is supported by Transformers and this change brings this functionality to TabbyAPI to ensure compatibility with Granite3 models and possibly with other models that might use this function.

mefich and others added 2 commits February 13, 2025 18:08
Granite3 default template uses strftime_now function.
Currently Jinja2 raises an exception because strftime_now is undefined and /v1/chat/completions endpoint doesn't work with these models when a template from the model metadata is used.
Signed-off-by: kingbri <[email protected]>
@kingbri1 kingbri1 merged commit ba9fae8 into theroyallab:main Feb 14, 2025
1 check 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