From f2625bca243e1bff96cb8a613173010084ece914 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 4 Dec 2023 08:07:04 -0800 Subject: [PATCH] (docs) quick start proxy --- docs/my-website/docs/proxy/quick_start.md | 125 +++++++++++----------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/docs/my-website/docs/proxy/quick_start.md b/docs/my-website/docs/proxy/quick_start.md index f2ae9ea22a1..f1749bc5095 100644 --- a/docs/my-website/docs/proxy/quick_start.md +++ b/docs/my-website/docs/proxy/quick_start.md @@ -87,69 +87,8 @@ print(response) -## Quick Start - LiteLLM Proxy + Config.yaml -The config allows you to create a model list and set `api_base`, `max_tokens` (all litellm params). See more details about the config [here](https://docs.litellm.ai/docs/proxy/configs) -### Create a Config for LiteLLM Proxy -Example config - -```yaml -model_list: - - model_name: gpt-3.5-turbo - litellm_params: - model: azure/ - api_base: - api_key: - - model_name: gpt-3.5-turbo - litellm_params: - model: azure/gpt-turbo-small-ca - api_base: https://my-endpoint-canada-berri992.openai.azure.com/ - api_key: -``` - -### Run proxy with config - -```shell -litellm --config your_config.yaml -``` - -## Quick Start Docker Image: Github Container Registry - -### Pull the litellm ghcr docker image -See the latest available ghcr docker image here: -https://github.com/berriai/litellm/pkgs/container/litellm - -```shell -docker pull ghcr.io/berriai/litellm:main-v1.10.1 -``` - -### Run the Docker Image -```shell -docker run ghcr.io/berriai/litellm:main-v1.10.0 -``` - -#### Run the Docker Image with LiteLLM CLI args - -See all supported CLI args [here](https://docs.litellm.ai/docs/proxy/cli): - -Here's how you can run the docker image and pass your config to `litellm` -```shell -docker run ghcr.io/berriai/litellm:main-v1.10.0 --config your_config.yaml -``` - -Here's how you can run the docker image and start litellm on port 8002 with `num_workers=8` -```shell -docker run ghcr.io/berriai/litellm:main-v1.10.0 --port 8002 --num_workers 8 -``` - -## Server Endpoints -- POST `/chat/completions` - chat completions endpoint to call 100+ LLMs -- POST `/completions` - completions endpoint -- POST `/embeddings` - embedding endpoint for Azure, OpenAI, Huggingface endpoints -- GET `/models` - available models on server -- POST `/key/generate` - generate a key to access the proxy - -## Supported LLMs +### Supported LLMs All LiteLLM supported LLMs are supported on the Proxy. Seel all [supported llms](https://docs.litellm.ai/docs/providers) @@ -301,6 +240,68 @@ $ litellm --model command-nightly +## Quick Start - LiteLLM Proxy + Config.yaml +The config allows you to create a model list and set `api_base`, `max_tokens` (all litellm params). See more details about the config [here](https://docs.litellm.ai/docs/proxy/configs) + +### Create a Config for LiteLLM Proxy +Example config + +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/ + api_base: + api_key: + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/gpt-turbo-small-ca + api_base: https://my-endpoint-canada-berri992.openai.azure.com/ + api_key: +``` + +### Run proxy with config + +```shell +litellm --config your_config.yaml +``` + +## Quick Start Docker Image: Github Container Registry + +### Pull the litellm ghcr docker image +See the latest available ghcr docker image here: +https://github.com/berriai/litellm/pkgs/container/litellm + +```shell +docker pull ghcr.io/berriai/litellm:main-v1.10.1 +``` + +### Run the Docker Image +```shell +docker run ghcr.io/berriai/litellm:main-v1.10.0 +``` + +#### Run the Docker Image with LiteLLM CLI args + +See all supported CLI args [here](https://docs.litellm.ai/docs/proxy/cli): + +Here's how you can run the docker image and pass your config to `litellm` +```shell +docker run ghcr.io/berriai/litellm:main-v1.10.0 --config your_config.yaml +``` + +Here's how you can run the docker image and start litellm on port 8002 with `num_workers=8` +```shell +docker run ghcr.io/berriai/litellm:main-v1.10.0 --port 8002 --num_workers 8 +``` + +## Server Endpoints +- POST `/chat/completions` - chat completions endpoint to call 100+ LLMs +- POST `/completions` - completions endpoint +- POST `/embeddings` - embedding endpoint for Azure, OpenAI, Huggingface endpoints +- GET `/models` - available models on server +- POST `/key/generate` - generate a key to access the proxy + ## Using with OpenAI compatible projects Set `base_url` to the LiteLLM Proxy server