From 2b370f8e9e569c55e16e6a33991a5ef1354b2a04 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 8 Oct 2024 07:12:01 +0530 Subject: [PATCH] (docs) key based callbacks (#6107) --- docs/my-website/docs/proxy/team_logging.md | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/docs/my-website/docs/proxy/team_logging.md b/docs/my-website/docs/proxy/team_logging.md index 1029ace16..bd79277cb 100644 --- a/docs/my-website/docs/proxy/team_logging.md +++ b/docs/my-website/docs/proxy/team_logging.md @@ -203,6 +203,11 @@ Use the `/key/generate` or `/key/update` endpoints to add logging callbacks to a ::: +### How key based logging works: + +- If **Key has no callbacks** configured, it will use the default callbacks specified in the config.yaml file +- If **Key has callbacks** configured, it will use the callbacks specified in the key + @@ -231,25 +236,7 @@ curl -X POST 'http://0.0.0.0:4000/key/generate' \ -1. Set gcs_bucket logging on your config.yaml - - By default, this will use - - `GCS_PATH_SERVICE_ACCOUNT` env variable to get the service account json path - - `GCS_BUCKET_NAME` env variable to get the bucket name to send logs to - - ```yaml - model_list: - - model_name: fake-openai-endpoint - litellm_params: - model: openai/fake - api_key: fake-key - api_base: https://exampleopenaiendpoint-production.up.railway.app/ - - litellm_settings: - callbacks: ["gcs_bucket"] - ``` - -2. Create Virtual Key to log to a specific GCS Bucket +1. Create Virtual Key to log to a specific GCS Bucket Set `GCS_SERVICE_ACCOUNT` in your environment to the path of the service account json ```bash @@ -275,7 +262,7 @@ curl -X POST 'http://0.0.0.0:4000/key/generate' \ ``` -4. Test it - `/chat/completions` request +2. Test it - `/chat/completions` request Use the virtual key from step 3 to make a `/chat/completions` request