-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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 a section on writing tool templates to the chat template docs #33924
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super clear, I really like it! I hope model authors read it 😅
docs/source/en/chat_templating.md
Outdated
``` | ||
|
||
A common pattern for handling tools in chat templates would be something like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is clear that these are examples and there's also a mention at the end, but maybe we can reinforce even more and explicitly state it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
I'm happy with this now - merging without core maintainer review since it's a pure documentation change |
…ggingface#33924) * Add a section on writing tool templates to the chat template docs * Small cleanups
…ggingface#33924) * Add a section on writing tool templates to the chat template docs * Small cleanups
…ggingface#33924) * Add a section on writing tool templates to the chat template docs * Small cleanups
The chat template docs have an extensive section on using tool templates, but they're missing good guidance to template authors. I added a section to help them, and also so there's a point of reference for the API we expect tool templates to follow.