-
Notifications
You must be signed in to change notification settings - Fork 538
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
[InferenceClient] Add support for adapter_id
(text-generation) and response_format
(chat-completion)
#2383
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.
Thanks for the PR @Wauplin, these seem like sensible changes to me!
Finally managed to fix the merge conflict + tests 😄 I'll merge now since last test is unrelated. |
@Wauplin I'm trying this with code:
And I get error:
This seems to be due to the regex being invalid. Is it possible to give a more explicit error from the server in case of incorrect regex? |
Also, constrained generation does not seem to work for me on chat_completion. Example:
Gives output: Which does not respect the regex, while: |
This PR updates the inference client and types following the latest TGI updates:
adapter_id
totext-generation
to chose whih LoRA should be loaded (cc @datavistics)response_format
tochat_completion
to constraint the response format with either a regex or a jsonschema (cc @aymeric-roucher)