mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: add metadata param to base send_image and forward in send_animation
_send_response_parts() calls send_image(metadata=_thread_metadata) but the base class signature didn't accept metadata, crashing platforms that don't override send_image. send_animation already had the param but wasn't forwarding it. Credit: @0xbyt4 (PR #1077)
This commit is contained in:
parent
1b2d6c424c
commit
0351e4fa90
1 changed files with 2 additions and 1 deletions
|
|
@ -510,6 +510,7 @@ class BasePlatformAdapter(ABC):
|
|||
image_url: str,
|
||||
caption: Optional[str] = None,
|
||||
reply_to: Optional[str] = None,
|
||||
metadata: Optional[Dict[str, Any]] = None,
|
||||
) -> SendResult:
|
||||
"""
|
||||
Send an image natively via the platform API.
|
||||
|
|
@ -537,7 +538,7 @@ class BasePlatformAdapter(ABC):
|
|||
(e.g., Telegram send_animation) so they auto-play inline.
|
||||
Default falls back to send_image.
|
||||
"""
|
||||
return await self.send_image(chat_id=chat_id, image_url=animation_url, caption=caption, reply_to=reply_to)
|
||||
return await self.send_image(chat_id=chat_id, image_url=animation_url, caption=caption, reply_to=reply_to, metadata=metadata)
|
||||
|
||||
@staticmethod
|
||||
def _is_animation_url(url: str) -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue