Skip to content

Build and run agents you can see, understand and trust.

Fix typing for content blocks and Gemini formatter annotations (#719)

idontwanttosayawordc5a97d3cd978
diff --git a/src/agentscope/formatter/_gemini_formatter.py b/src/agentscope/formatter/_gemini_formatter.py
index b3aaec809..b94880457 100644
--- a/src/agentscope/formatter/_gemini_formatter.py
+++ b/src/agentscope/formatter/_gemini_formatter.py
@@ -84,7 +84,7 @@ class GeminiChatFormatter(TruncatedFormatterBase):
]
"""The list of supported message blocks"""
- supported_extensions: list[str] = {
+ supported_extensions: dict[str, list[str]] = {
"image": ["png", "jpeg", "webp", "heic", "heif"],
"video": [
"mp4",
diff --git a/src/agentscope/message/_message_base.py b/src/agentscope/message/_message_base.py
index 445b140c2..8e41610f7 100644
--- a/src/agentscope/message/_message_base.py
+++ b/src/agentscope/message/_message_base.py
@@ -146,7 +146,7 @@ class Msg:
def get_content_blocks(
self,
block_type: Literal["tool_result"],
- ) -> List[ToolUseBlock]:
+ ) -> List[ToolResultBlock]:
...
@overload