"...text-generation-inference.git" did not exist on "3b71c38558a9198c8424c09bbcfac03a93282d08"
Unverified Commit cb0a2948 authored by Nicolas Patry's avatar Nicolas Patry
Browse files

FIxing the CI.

parent c7ab1810
...@@ -2094,4 +2094,4 @@ ...@@ -2094,4 +2094,4 @@
"description": "Hugging Face Text Generation Inference API" "description": "Hugging Face Text Generation Inference API"
} }
] ]
} }
\ No newline at end of file
...@@ -88,7 +88,7 @@ There is also an async version of the client, `AsyncInferenceClient`, based on ` ...@@ -88,7 +88,7 @@ There is also an async version of the client, `AsyncInferenceClient`, based on `
You can directly use the OpenAI [Python](https://github.com/openai/openai-python) or [JS](https://github.com/openai/openai-node) clients to interact with TGI. You can directly use the OpenAI [Python](https://github.com/openai/openai-python) or [JS](https://github.com/openai/openai-node) clients to interact with TGI.
Install the OpenAI Python package via pip. Install the OpenAI Python package via pip.
```bash ```bash
pip install openai pip install openai
...@@ -145,7 +145,7 @@ def inference(message, history): ...@@ -145,7 +145,7 @@ def inference(message, history):
stream=True, stream=True,
max_tokens=1024, max_tokens=1024,
) )
for chunk in output: for chunk in output:
partial_message += chunk.choices[0].delta.content partial_message += chunk.choices[0].delta.content
yield partial_message yield partial_message
...@@ -196,4 +196,4 @@ To serve both ChatUI and TGI in same environment, simply add your own endpoints ...@@ -196,4 +196,4 @@ To serve both ChatUI and TGI in same environment, simply add your own endpoints
} }
``` ```
![ChatUI](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/chatui_screen.png) ![ChatUI](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/chatui_screen.png)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment