Skip to content

Server: use llama_chat_apply_template to format the chat #5575

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

Closed
ngxson opened this issue Feb 18, 2024 · 0 comments · Fixed by #5593
Closed

Server: use llama_chat_apply_template to format the chat #5575

ngxson opened this issue Feb 18, 2024 · 0 comments · Fixed by #5593
Labels
enhancement New feature or request

Comments

@ngxson
Copy link
Collaborator

ngxson commented Feb 18, 2024

Depends on #5538 to be merged

In #5425 , I mentioned that the chat template can be (ideally) detected using model metadata tokenizer.chat_template, but at that time, I didn't know that it is possible to access the metadata

Now that we have llama_chat_apply_template, we no longer have to worry about metadata. We can use this new function to format the chat supplied to /v1/chat/completions

@ngxson ngxson added the enhancement New feature or request label Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant