Logger
gemini.Utils
Utility functions and helpers for Gemini integration.
GeminiUtils
parse_gemini_generation_content
Parse the generation response from Google’s Generative AI API into a standardized format.
Arguments:
Name | Type | Description |
---|---|---|
response | GenerateContentResponse | The raw response from the model |
Returns:
Dict[str, Any]: A dictionary containing the parsed response with standardized fields:
- usage: Token counts for prompt and completion
- id: Generated UUID for the response
- created: Unix timestamp of when response was parsed