dify/api/core/tools
QuantumGhost 349c3cf7b8
feat(api): Add image multimodal support for LLMNode (#17372)
Enhance `LLMNode` with multimodal capability, introducing support for
image outputs.

This implementation extracts base64-encoded images from LLM responses,
saves them to the storage service, and records the file metadata in the
`ToolFile` table. In conversations, these images are rendered as
markdown-based inline images.
Additionally, the images are included in the LLMNode's output as
file variables, enabling subsequent nodes in the workflow to utilize them.

To integrate file outputs into workflows, adjustments to the frontend code
are necessary.

For multimodal output functionality, updates to related model configurations
are required. Currently, this capability has been applied exclusively to
Google's Gemini models.

Close #15814.

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
2025-04-30 17:28:02 +08:00
..
__base chore: docstring not match the function parameter (#17162) 2025-03-31 13:19:15 +08:00
builtin_tool Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
custom_tool fix: autocorrect everything in api (#17859) 2025-04-11 15:24:39 +08:00
entities feat: implement blob chunk handling in plugin manager (#18101) 2025-04-15 19:23:03 +08:00
plugin_tool refactor: rename plugin manager to plugin client and rename path from manager to impl (#18876) 2025-04-27 14:22:25 +08:00
utils feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
workflow_as_tool chore: docstring not match the function parameter (#17162) 2025-03-31 13:19:15 +08:00
__init__.py improve: generalize tool parameter converter (#4786) 2024-06-03 21:26:58 +08:00
errors.py fix: enhance ToolEngineInvokeError to include meta information (#12238) 2024-12-31 14:01:24 +08:00
signature.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
tool_engine.py fix: when cot_agent call tool like searxng lost some response content (#16781) 2025-04-28 09:27:46 +08:00
tool_file_manager.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
tool_label_manager.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
tool_manager.py refactor: rename plugin manager to plugin client and rename path from manager to impl (#18876) 2025-04-27 14:22:25 +08:00