Zum Hauptinhalt springen

Google Cloud Storage Buckets

LLM-Protokolle in Google Cloud Storage Buckets protokollieren

Info

✨ Dies ist eine reine Enterprise-Funktion Starten Sie hier mit Enterprise

Verwendung

  1. gcs_bucket zur LiteLLM Config.yaml hinzufügen
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
  1. Erforderliche Umgebungsvariablen festlegen
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
  1. Proxy starten
litellm --config /path/to/config.yaml
  1. Testen Sie es!
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"
}
],
}
'

Erwartete Protokolle in GCS-Buckets

In GCS-Buckets protokollierte Felder

Das Standard-Logging-Objekt wird im GCS-Bucket protokolliert

service_account.json von der Google Cloud Console erhalten

  1. Gehen Sie zur Google Cloud Console
  2. Suchen Sie nach IAM & Admin
  3. Klicken Sie auf Dienstkonten
  4. Wählen Sie ein Dienstkonto aus
  5. Klicken Sie auf 'Schlüssel' -> Schlüssel hinzufügen -> Neuen Schlüssel erstellen -> JSON
  6. Speichern Sie die JSON-Datei und fügen Sie den Pfad zu GCS_PATH_SERVICE_ACCOUNT hinzu

Support & Sprechen Sie mit den Gründern