From 69a3b6b8cf6f1079221d7a1d40476468979ba94f Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 25 Nov 2023 12:18:35 -0800 Subject: [PATCH] docs(simple_proxy.md): improve loading key from vault example --- docs/my-website/docs/simple_proxy.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index 2eb12d85c2..16acb4a780 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -766,6 +766,10 @@ $ litellm --config /path/to/config.yaml If you have secrets saved in Azure Vault, etc. and don't want to expose them in the config.yaml, here's how to load model-specific keys from the environment. +```python +os.environ["AZURE_NORTH_AMERICA_API_KEY"] = "your-azure-api-key" +``` + ```yaml model_list: - model_name: gpt-4-team1 @@ -773,9 +777,11 @@ model_list: model: azure/chatgpt-v-2 api_base: https://openai-gpt-4-test-v-1.openai.azure.com/ api_version: "2023-05-15" - api_key: os.environ/ + api_key: os.environ/AZURE_NORTH_AMERICA_API_KEY ``` +[**See Code**](https://github.com/BerriAI/litellm/blob/c12d6c3fe80e1b5e704d9846b246c059defadce7/litellm/utils.py#L2366) + s/o to [@David Manouchehri](https://www.linkedin.com/in/davidmanouchehri/) for helping with this. ### Load Balancing - Multiple Instances of 1 model