From 9944e8d1a5b59a1fca7b815eb68ad85accd79c16 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 5 Jul 2024 19:05:08 -0700 Subject: [PATCH] docs -galileo logging --- docs/my-website/docs/proxy/logging.md | 64 +++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/docs/my-website/docs/proxy/logging.md b/docs/my-website/docs/proxy/logging.md index 83bf8ee95da..1919ea4f2fc 100644 --- a/docs/my-website/docs/proxy/logging.md +++ b/docs/my-website/docs/proxy/logging.md @@ -7,10 +7,13 @@ import TabItem from '@theme/TabItem'; Log Proxy Input, Output, Exceptions using Langfuse, OpenTelemetry, Custom Callbacks, DataDog, DynamoDB, s3 Bucket +## Table of Contents + - [Logging to Langfuse](#logging-proxy-inputoutput---langfuse) - [Logging with OpenTelemetry (OpenTelemetry)](#logging-proxy-inputoutput-in-opentelemetry-format) - [Async Custom Callbacks](#custom-callback-class-async) - [Async Custom Callback APIs](#custom-callback-apis-async) +- [Logging to Galileo](#logging-llm-io-to-galielo) - [Logging to OpenMeter](#logging-proxy-inputoutput---langfuse) - [Logging to s3 Buckets](#logging-proxy-inputoutput---s3-buckets) - [Logging to DataDog](#logging-proxy-inputoutput---datadog) @@ -1056,6 +1059,67 @@ litellm_settings: Start the LiteLLM Proxy and make a test request to verify the logs reached your callback API + +## [Beta] Logging LLM I/O to Galileo + +Log LLM I/O on [www.rungalileo.io](https://www.rungalileo.io/) + +:::info + +Beta Integration + +::: + +**Required Env Variables** + +```bash +export GALILEO_BASE_URL="" # For most users, this is the same as their console URL except with the word 'console' replaced by 'api' (e.g. http://www.console.galileo.myenterprise.com -> http://www.api.galileo.myenterprise.com) +export GALILEO_PROJECT_ID="" +export GALILEO_USERNAME="" +export GALILEO_PASSWORD="" +``` + +### Quick Start + +1. Add to Config.yaml +```yaml +model_list: +- litellm_params: + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + api_key: my-fake-key + model: openai/my-fake-model + model_name: fake-openai-endpoint + +litellm_settings: + success_callback: ["galileo"] # 👈 KEY CHANGE +``` + +2. Start Proxy + +``` +litellm --config /path/to/config.yaml +``` + +3. Test it! + +```bash +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "fake-openai-endpoint", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ], + } +' +``` + + +🎉 That's it - Expect to see your Logs on your Galileo Dashboard + ## Logging Proxy Cost + Usage - OpenMeter Bill customers according to their LLM API usage with [OpenMeter](../observability/openmeter.md)