Gemini Parser¶
Parser for Google Gemini function call responses.
gemini
¶
Parser for Google Gemini function call responses.
GeminiResponseParser
¶
Parses Gemini GenerateContentResponse into AgentResponse.
Handles the Gemini response format where tool calls appear as function_call parts in response.candidates[].content.parts[].
Works with both the raw dict format and the google-genai SDK objects.
Usage
parser = GeminiResponseParser() response = parser.parse(gemini_raw_response)
parse
¶
parse(raw_response: Any) -> AgentResponse
Parse a Gemini response into a normalized AgentResponse.