@@ -171,7 +171,7 @@ def extract_contents_text(contents):
171171
172172 # Content object with parts - recurse into parts
173173 if getattr (contents , "parts" , None ):
174- return extract_contents_text (contents .parts ) # type: ignore
174+ return extract_contents_text (contents .parts )
175175
176176 # Direct text attribute
177177 if hasattr (contents , "text" ):
@@ -229,13 +229,13 @@ def extract_tool_calls(response):
229229
230230 # Extract from candidates, sometimes tool calls are nested under the content.parts object
231231 if getattr (response , "candidates" , []):
232- for candidate in response .candidates : # type: ignore
232+ for candidate in response .candidates :
233233 if not hasattr (candidate , "content" ) or not getattr (
234234 candidate .content , "parts" , []
235235 ):
236236 continue
237237
238- for part in candidate .content .parts : # type: ignore
238+ for part in candidate .content .parts :
239239 if getattr (part , "function_call" , None ):
240240 function_call = part .function_call
241241 tool_call = {
@@ -245,7 +245,7 @@ def extract_tool_calls(response):
245245
246246 # Extract arguments if available
247247 if getattr (function_call , "args" , None ):
248- tool_call ["arguments" ] = safe_serialize (function_call .args ) # type: ignore
248+ tool_call ["arguments" ] = safe_serialize (function_call .args )
249249
250250 tool_calls .append (tool_call )
251251
0 commit comments