dify/api/models
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
..
__init__.py chore: use TenantAccountRole instead of TenantAccountJoinRole (#15514) 2025-03-12 12:56:30 +08:00
account.py chore: use TenantAccountRole instead of TenantAccountJoinRole (#15514) 2025-03-12 12:56:30 +08:00
api_based_extension.py feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
base.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
dataset.py Fix Performance Issues: (#17083) 2025-04-09 11:22:53 +08:00
engine.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
enums.py chore: bump minimum supported Python version to 3.11 (#10386) 2024-11-24 13:28:46 +08:00
model.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
provider.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
source.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
task.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
tools.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
types.py chore(api/models): apply ruff reformatting (#7600) 2024-09-10 17:08:06 +08:00
web.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
workflow.py chore: fix reimported (#18610) 2025-04-23 16:48:00 +08:00