Update docs/source/messages_api.md

Co-authored-by: Philipp Schmid <32632186+philschmid@users.noreply.github.com>
This commit is contained in:
drbh 2024-02-02 09:58:29 -05:00 committed by GitHub
parent 02912ad273
commit 58ddedec16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,7 +92,8 @@ print(chat_completion)
## Hugging Face Inference Endpoints ## Hugging Face Inference Endpoints
TGI is now integrated with [Inference Endpoints](https://huggingface.co/inference-endpoints/dedicated) and can be easily accessed with only a few lines of code. Here's an example of how to use IE with TGI using OpenAI's Python client library: The Messages API is integrated with [Inference Endpoints](https://huggingface.co/inference-endpoints/dedicated).
Every endpoint that uses "Text Generation Inference" with an LLM, which has a chat template can now be used. Below is an example of how to use IE with TGI using OpenAI's Python client library:
> **Note:** Make sure to replace `base_url` with your endpoint URL and to include `v1/` at the end of the URL. The `api_key` should be replaced with your Hugging Face API key. > **Note:** Make sure to replace `base_url` with your endpoint URL and to include `v1/` at the end of the URL. The `api_key` should be replaced with your Hugging Face API key.