Skip to content

Commit f6daff4

Browse files
committed
fix: improve unknown part label in example script
Show the part's type attribute (when available) instead of the Python class name so unrecognized Gemini parts are easier to identify. Made-with: Cursor
1 parent 5306ab5 commit f6daff4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/adk_streaming_thinking_usage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ def _print_parts(parts: Any, indent: str = " ") -> None:
137137
f"({getattr(fc, 'args', {})})"
138138
)
139139
else:
140-
print(f"{indent}[unknown part] {type(p).__name__}")
140+
label = getattr(p, "type", None) or type(p).__name__
141+
print(f"{indent}[unknown part: {label}]")
141142

142143

143144
async def run_non_streaming(

0 commit comments

Comments
 (0)