Google Cloud Storage 存储桶
将 LLM 日志记录到 Google Cloud Storage 存储桶
信息
✨ 这是企业版专属功能 在此处开始使用企业版
用法
- 将
gcs_bucket
添加到 LiteLLM Config.yaml
model_list:
- litellm_params:
api_base: https://openai-function-calling-workers.tasslexyz.workers.dev/
api_key: my-fake-key
model: openai/my-fake-model
model_name: fake-openai-endpoint
litellm_settings:
callbacks: ["gcs_bucket"] # 👈 KEY CHANGE # 👈 KEY CHANGE
- 设置必需的环境变量
GCS_BUCKET_NAME="<your-gcs-bucket-name>"
GCS_PATH_SERVICE_ACCOUNT="/Users/ishaanjaffer/Downloads/adroit-crow-413218-a956eef1a2a8.json" # Add path to service account.json
- 启动代理
litellm --config /path/to/config.yaml
- 测试一下!
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"
}
],
}
'
预期的 GCS 存储桶日志
记录到 GCS 存储桶的字段
从 Google Cloud Console 获取 service_account.json
- 前往 Google Cloud Console
- 搜索 IAM 和管理
- 点击 服务帐号
- 选择一个服务帐号
- 点击 '密钥' -> 添加密钥 -> 创建新密钥 -> JSON
- 保存 JSON 文件,并将路径添加到
GCS_PATH_SERVICE_ACCOUNT
支持和与创始人交流
- 安排演示 👋
- 社区 Discord 💭
- 我们的电话 📞 +1 (770) 8783-106 / +1 (412) 618-6238
- 我们的邮箱 ✉️ ishaan@berri.ai / krrish@berri.ai