-
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
Promote chat_completion in inference guide #2366
Conversation
docs/source/en/guides/inference.md
Outdated
|
||
In the example above, we initialized an [`InferenceClient`] with the default parameters. The only thing you need to know is the [task](#supported-tasks) you want to perform. By default, the client will connect to the Inference API and select a model to complete the task. In our example, we generated an image from a text prompt. The returned value is a `PIL.Image` object that can be saved to a file. For more details, check out the [`~InferenceClient.text_to_image`] documentation. | ||
|
||
Let's now see an example using the chat-completion API. This task uses an LLM to generate a response from a list of messages: |
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.
Maybe specify what kind of models are compatible with the chat-completion API.
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.
chat-completion
-> chat_completion
?
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.
Good call, I have added a link to https://huggingface.co/models?other=conversational&sort=likes
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.
Nice! cc @merveenoyan maybe a chat completion example + short explanation on https://huggingface.co/tasks/text-generation could be nice too.
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. |
* Promote chat_completion in inference guide * fix KO docs * update example + list conversational models * feedback * fix KO? * fix fix KO * ko * fix fix fix
cc @gary149 who suggested it on slack. This PR adds a
chat_completion
example in theGetting started
section of the guide.