From edfa4d550abb85fad0d5991cf04a85b472ad6208 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 25 Oct 2023 09:12:29 -0700 Subject: [PATCH] docs(anyscale.md): adding anyscale documentation n --- docs/my-website/docs/providers/anyscale.md | 54 ++++++++++++++++++++++ docs/my-website/sidebars.js | 1 + 2 files changed, 55 insertions(+) create mode 100644 docs/my-website/docs/providers/anyscale.md diff --git a/docs/my-website/docs/providers/anyscale.md b/docs/my-website/docs/providers/anyscale.md new file mode 100644 index 00000000000..6f685316920 --- /dev/null +++ b/docs/my-website/docs/providers/anyscale.md @@ -0,0 +1,54 @@ +# Anyscale AI +https://app.endpoints.anyscale.com/ + +## API Key +```python +# env variable +os.environ['ANYSCALE_API_KEY'] +``` + +## Sample Usage +```python +from litellm import completion +import os + +os.environ['ANYSCALE_API_KEY'] = "" +response = completion( + model="anyscale/mistralai/Mistral-7B-Instruct-v0.1", + messages=messages +) +print(response) +``` + +## Sample Usage - Streaming +```python +from litellm import completion +import os + +os.environ['ANYSCALE_API_KEY'] = "" +response = completion( + model="anyscale/mistralai/Mistral-7B-Instruct-v0.1", + messages=messages, + stream=True +) + +for chunk in response: + print(chunk) +``` + + +## Supported Models +All models listed here https://app.endpoints.anyscale.com/ are supported. We actively maintain the list of models, pricing, token window, etc. [here](https://github.com/BerriAI/litellm/blob/c1b25538277206b9f00de5254d80d6a83bb19a29/model_prices_and_context_window.json#L659). + +| Model Name | Function Call | +|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| llama2-7b-chat | `completion(model="anyscale/meta-llama/Llama-2-7b-chat-hf", messages)` | +| llama-2-13b-chat | `completion(model="anyscale/meta-llama/Llama-2-13b-chat-hf", messages)` | +| llama-2-70b-chat | `completion(model="anyscale/meta-llama/Llama-2-70b-chat-hf", messages)` | +| mistral-7b-instruct | `completion(model="anyscale/mistralai/Mistral-7B-Instruct-v0.1", messages)` | +| CodeLlama-34b-Instruct | `completion(model="anyscale/codellama/CodeLlama-34b-Instruct-hf", messages)` | + + + + + diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index 9f811b5f722..7401ea7a0e4 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -71,6 +71,7 @@ const sidebars = { "providers/anthropic", "providers/aws_sagemaker", "providers/bedrock", + "providers/anyscale", "providers/perplexity", "providers/vllm", "providers/deepinfra",