diff --git a/docs/my-website/docs/providers/openai.md b/docs/my-website/docs/providers/openai.md index c50cc759872..ccb2c418bc7 100644 --- a/docs/my-website/docs/providers/openai.md +++ b/docs/my-website/docs/providers/openai.md @@ -25,7 +25,7 @@ response = completion( ) ``` -### Proxy Usage +### Usage - LiteLLM Proxy Server Here's how to call OpenAI models with the LiteLLM Proxy Server @@ -38,6 +38,29 @@ export OPENAI_API_KEY="" ### 2. Start the proxy + + +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo + api_key: os.environ/OPENAI_API_KEY +``` + + + +Use this to add all openai models with one API Key. **WARNING: This will not do any load balancing** +This means requests to `gpt-4`, `gpt-3.5-turbo` , `gpt-4-turbo-preview` will all go through this route + +```yaml +model_list: + - model_name: "*" # all requests where model not in your config go to this deployment + litellm_params: + model: openai/* # set `openai/` to use the openai route + api_key: os.environ/OPENAI_API_KEY +``` + ```bash @@ -46,15 +69,7 @@ $ litellm --model gpt-3.5-turbo # Server running on http://0.0.0.0:4000 ``` - -```yaml -model_list: - - model_name: gpt-3.5-turbo - litellm_params: - model: gpt-3.5-turbo -``` - ### 3. Test it