From 0c1d754e2c57b9623689b1820fdb026abcc687a0 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 19 Mar 2024 17:40:52 -0700 Subject: [PATCH] docs(cost_tracking.md): cleanup docs --- docs/my-website/docs/proxy/configs.md | 23 ++++----------------- docs/my-website/docs/proxy/cost_tracking.md | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/my-website/docs/proxy/configs.md b/docs/my-website/docs/proxy/configs.md index 8ef7a034f29..1ece75529e2 100644 --- a/docs/my-website/docs/proxy/configs.md +++ b/docs/my-website/docs/proxy/configs.md @@ -246,6 +246,10 @@ $ litellm --config /path/to/config.yaml ## Load Balancing +:::info +For more on this, go to [this page](./load_balancing.md) +::: + Use this to call multiple instances of the same model and configure things like [routing strategy](../routing.md#advanced). For optimal performance: @@ -306,25 +310,6 @@ router_settings: # router_settings are optional redis_port: 1992 ``` -## Set Azure `base_model` for cost tracking - -**Problem**: Azure returns `gpt-4` in the response when `azure/gpt-4-1106-preview` is used. This leads to inaccurate cost tracking - -**Solution** ✅ : Set `base_model` on your config so litellm uses the correct model for calculating azure cost - -Example config with `base_model` -```yaml -model_list: - - model_name: azure-gpt-3.5 - litellm_params: - model: azure/chatgpt-v-2 - api_base: os.environ/AZURE_API_BASE - api_key: os.environ/AZURE_API_KEY - api_version: "2023-07-01-preview" - model_info: - base_model: azure/gpt-4-1106-preview -``` - You can view your cost once you set up [Virtual keys](https://docs.litellm.ai/docs/proxy/virtual_keys) or [custom_callbacks](https://docs.litellm.ai/docs/proxy/logging) ## Load API Keys diff --git a/docs/my-website/docs/proxy/cost_tracking.md b/docs/my-website/docs/proxy/cost_tracking.md index bfcf7f1aaae..887ec9e3edb 100644 --- a/docs/my-website/docs/proxy/cost_tracking.md +++ b/docs/my-website/docs/proxy/cost_tracking.md @@ -15,4 +15,25 @@ model_list: base_model: dall-e-3 # 👈 set dall-e-3 as base model model_info: mode: image_generation +``` + +## Chat Completions / Embeddings + +**Problem**: Azure returns `gpt-4` in the response when `azure/gpt-4-1106-preview` is used. This leads to inaccurate cost tracking + +**Solution** ✅ : Set `base_model` on your config so litellm uses the correct model for calculating azure cost + +Get the base model name from [here](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json) + +Example config with `base_model` +```yaml +model_list: + - model_name: azure-gpt-3.5 + litellm_params: + model: azure/chatgpt-v-2 + api_base: os.environ/AZURE_API_BASE + api_key: os.environ/AZURE_API_KEY + api_version: "2023-07-01-preview" + model_info: + base_model: azure/gpt-4-1106-preview ``` \ No newline at end of file