BerriAI / litellm

Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropic, Sagemaker, HuggingFace, Replicate, Groq]
https://docs.litellm.ai/docs/
Other
13.94k stars 1.64k forks source link

[Feat- prometheus] track input and output tokens #5780

Closed ishaan-jaff closed 2 months ago

ishaan-jaff commented 2 months ago

Title

{
  "total_tokens": {
    "value": 168.0,
    "labels": {
      "api_key_alias": "None",
      "end_user": "None",
      "hashed_api_key": "88dc28d0f030c55ed4ab77ed8faf098196cb1c05df778539800c9f1243fe6b4b",
      "model": "gemini-1.5-pro",
      "team": "None",
      "team_alias": "None",
      "user": "default_user_id"
    }
  },
  "input_tokens": {
    "value": 15.0,
    "labels": {
      "api_key_alias": "None",
      "end_user": "None",
      "hashed_api_key": "88dc28d0f030c55ed4ab77ed8faf098196cb1c05df778539800c9f1243fe6b4b",
      "model": "gemini-1.5-pro",
      "team": "None",
      "team_alias": "None",
      "user": "default_user_id"
    }
  },
  "output_tokens": {
    "value": 153.0,
    "labels": {
      "api_key_alias": "None",
      "end_user": "None",
      "hashed_api_key": "88dc28d0f030c55ed4ab77ed8faf098196cb1c05df778539800c9f1243fe6b4b",
      "model": "gemini-1.5-pro",
      "team": "None",
      "team_alias": "None",
      "user": "default_user_id"
    }
  }
}

Relevant issues

Type

๐Ÿ†• New Feature ๐Ÿ› Bug Fix ๐Ÿงน Refactoring ๐Ÿ“– Documentation ๐Ÿš„ Infrastructure โœ… Test

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
litellm โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Sep 19, 2024 0:03am