File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
sentry_sdk/integrations/google_genai Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def accumulate_streaming_response(chunks):
9595
9696
9797def set_span_data_for_streaming_response (span , integration , accumulated_response ):
98- # type: (Span, Any, dict[str, Any] ) -> None
98+ # type: (Span, Any, AccumulatedResponse ) -> None
9999 """Set span data for accumulated streaming response."""
100100 # Set response text
101101 if (
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ def extract_tool_calls(response):
256256 if not getattr (content , "parts" , None ):
257257 continue
258258
259- for part in content . parts :
259+ for part in getattr ( content , " parts" , []) :
260260 if getattr (part , "function_call" , None ):
261261 function_call = part .function_call
262262 tool_call = {
@@ -416,7 +416,7 @@ def extract_finish_reasons(response):
416416 return None
417417
418418 finish_reasons = []
419- for candidate in response . candidates :
419+ for candidate in getattr ( response , " candidates" , []) :
420420 if getattr (candidate , "finish_reason" , None ):
421421 # Convert enum value to string if necessary
422422 reason = str (candidate .finish_reason )
You can’t perform that action at this time.
0 commit comments