From f65ceef46af08f0cfa0cfce33a978d08c62e024d Mon Sep 17 00:00:00 2001 From: "Victor Mustar (aider)" Date: Wed, 4 Sep 2024 19:19:50 +0200 Subject: [PATCH] remove conversational-task deprecated --- docs/my-website/docs/providers/huggingface.md | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/docs/my-website/docs/providers/huggingface.md b/docs/my-website/docs/providers/huggingface.md index cf3ae5f23..4620a6c5d 100644 --- a/docs/my-website/docs/providers/huggingface.md +++ b/docs/my-website/docs/providers/huggingface.md @@ -82,74 +82,6 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \ }' ``` - - - - - -Append `conversational` to the model name - -e.g. `huggingface/conversational/` - - - - -```python -import os -from litellm import completion - -# [OPTIONAL] set env var -os.environ["HUGGINGFACE_API_KEY"] = "huggingface_api_key" - -messages = [{ "content": "There's a llama in my garden 😱 What should I do?","role": "user"}] - -# e.g. Call 'facebook/blenderbot-400M-distill' hosted on HF Inference endpoints -response = completion( - model="huggingface/conversational/facebook/blenderbot-400M-distill", - messages=messages, - api_base="https://my-endpoint.huggingface.cloud" -) - -print(response) -``` - - - - -1. Add models to your config.yaml - -```yaml -model_list: - - model_name: blenderbot - litellm_params: - model: huggingface/conversational/facebook/blenderbot-400M-distill - api_key: os.environ/HUGGINGFACE_API_KEY - api_base: "https://my-endpoint.endpoints.huggingface.cloud" -``` - -2. Start the proxy - -```bash -$ litellm --config /path/to/config.yaml --debug -``` - -3. Test it! - -```shell -curl --location 'http://0.0.0.0:4000/chat/completions' \ - --header 'Authorization: Bearer sk-1234' \ - --header 'Content-Type: application/json' \ - --data '{ - "model": "blenderbot", - "messages": [ - { - "role": "user", - "content": "I like you!" - } - ], -}' -``` -