From e46dab5e92069a90403c8fc40d85994b66b92c0a Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 12 Sep 2023 10:07:40 -0700 Subject: [PATCH] docs --- docs/my-website/docs/set_keys.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/my-website/docs/set_keys.md b/docs/my-website/docs/set_keys.md index af828e02a..9f4a6bee2 100644 --- a/docs/my-website/docs/set_keys.md +++ b/docs/my-website/docs/set_keys.md @@ -1,14 +1,15 @@ # Setting API Keys, Base, Version +LiteLLM allows you to specify the following: +* API Key +* API Base +* API Version +* API Type -environment variables - -setting litellm.api_key - -setting litellm._api_key (e.g. litellm.openai_api_key, litellm.anthropic_api_key, etc.) - -passing in dynamically via completion() call - e.g. completion(..., api_key="...") - +You can set the API configs using: +* Environment Variables +* litellm.api_key [litellm variables] +* Passing args to `completion()` # Setting API Keys, Base, and Version @@ -16,6 +17,8 @@ API keys, base API endpoint, and API version can be set via environment variable ## Environment Variables +### Setting API Keys + Set the liteLLM API key or specific provider key: ```python @@ -28,6 +31,15 @@ os.environ["REPLICATE_API_KEY"] = "Your API Key" os.environ["TOGETHERAI_API_KEY"] = "Your API Key" ``` +### Setting API Base and API Version + +```python +AZURE_API_BASE = "https://openai-gpt-4-test-v-1.openai.azure.com/" +AZURE_API_VERSION = "2023-05-15" +``` + +### Setting API Version + ## Dynamic API Key You can pass the API key within `completion()` call: