mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
add galileo response pydantic obj
This commit is contained in:
parent
c99a5a58ec
commit
dc1d69f2a0
1 changed files with 24 additions and 0 deletions
24
litellm/integrations/types/galileo.py
Normal file
24
litellm/integrations/types/galileo.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from datetime import datetime
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# from here: https://docs.rungalileo.io/galileo/gen-ai-studio-products/galileo-observe/how-to/logging-data-via-restful-apis#structuring-your-records
|
||||
class LLMResponse(BaseModel):
|
||||
latency_ms: int
|
||||
status_code: int
|
||||
input_text: str
|
||||
output_text: str
|
||||
node_type: str
|
||||
model: str
|
||||
num_input_tokens: int
|
||||
num_output_tokens: int
|
||||
output_logprobs: Optional[Dict[str, Any]] = Field(
|
||||
description="Optional. When available, logprobs are used to compute Uncertainty."
|
||||
)
|
||||
created_at: datetime = Field(
|
||||
..., description='timestamp constructed in "%Y-%m-%dT%H:%M:%S" format'
|
||||
)
|
||||
tags: List[str]
|
||||
user_metadata: Dict[str, Any]
|
||||
Loading…
Add table
Reference in a new issue