Skip to content

Fix type hints for apply_chat_template #35216

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

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

Rocketknight1
Copy link
Member

@Rocketknight1 Rocketknight1 commented Dec 11, 2024

As @qgallouedec and @August-murr pointed out in huggingface/trl#2455, the type hints for apply_chat_template are incorrect. Tools can be passed as Callable functions as well as JSON schema dict and this is documented here.

This PR corrects the type hints to follow the documentation/code!

@HuggingFaceDocBuilderDev

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.

@Rocketknight1 Rocketknight1 merged commit 5cf11e5 into main Dec 12, 2024
25 checks passed
@Rocketknight1 Rocketknight1 deleted the fix_chat_template_tool_types branch December 12, 2024 13:59
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.

3 participants