-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
When tools return image content (e.g., image generation tools like DALL-E, Stable Diffusion), the generated images should be sent back to the Telegram user as photos.
Current State
The ImageEvent plumbing exists in the stream pipeline (added in #29), but nothing produces image events because:
tool.Tool.Execute()returnsstringonlyengine.ToolFuncreturnsaitypes.TextContentonlyGoRunner.buildToolSet()wraps tool results asTextContent
Proposed Changes
- Change
engine.ToolFuncto return[]aitypes.ContentBlockinstead ofTextContent - Update
tool_execution.goto pass content blocks through directly - Update
GoRunner.buildToolSet()to wrap text tools into[]ContentBlock - In
convertLoopEventforToolFinished, emitImageEventforImageContentblocks - Optionally add a
MultimodalToolinterface for tools that return[]ContentBlock
The Telegram side already handles ImageEvent — it collects images during streaming and sends them as tele.Photo after the text response.
Related
Follow-up from #29 (image input support).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels