mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
gemini_image plugin: return generated text together with generated images #679
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @acro-k-tanaka on GitHub (Sep 29, 2025).
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Environment
Description
Currently the gemini_image tool only yields generated image blobs back to Dify workflows. For example it uses:
(see: tools/gemini_image/tools/image_generate.py).
This means generated text (if any) from the model is not available to Dify flows as the
textoutput. I would like the tool to also return the generated text so workflows (and downstream nodes) can use it — similar to the user experience of Nano Banana in Google AI Studio where both image and generated caption/text are available.Expected behavior
create_text_message) in addition to returning the image blob. This will populate the tool'stextoutput variable and make it available in flows. See Dify tool message helpers:create_text_message,create_blob_message. ([Dify Docs][3])Proposed change
After obtaining the generated text from the model response, yield a text message before/after yielding the blob. Example (pseudo patch):
Notes:
textfor flows.Steps to reproduce
textoutput is empty / only files are returned.Self Checks (please fill before submitting PR)
2. Additional context or comments
No response
3. Can you help us with this feature?