dify/api/core
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
..
agent fix: metadata filter not work (#19020) 2025-04-30 11:06:03 +08:00
app feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
callback_handler fix retrival resource miss in chatflow (#18307) 2025-04-17 18:05:15 +08:00
entities fix: #18744 The model order defined in position.yaml in the Model Plugin is not taking effect. (#18756) 2025-04-25 16:45:48 +08:00
errors fix(core/errors): change base class of custom exceptions to ValueError (#11955) 2024-12-22 10:41:34 +08:00
extension feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
external_data_tool Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
file feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
helper Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
llm_generator Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
memory fix: Update prompt message content types to use Literal and add union type for content (#17136) 2025-04-22 16:17:55 +08:00
model_runtime feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
moderation Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
ops refactor: Refactors repository imports structure (#18901) 2025-04-27 17:29:03 +08:00
plugin Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
prompt Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
rag immediately return initialed tiktokenizer instance and remove dead code in usage of tiktokenizer (#17957) 2025-04-30 16:07:20 +08:00
repositories refactor: Refactors repository imports structure (#18901) 2025-04-27 17:29:03 +08:00
tools feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
variables fix Unicode Escape Characters (#15318) 2025-03-10 09:22:41 +08:00
workflow feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
__init__.py chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
hosting_configuration.py chore(provider_manager): Update hosted model's name (#14334) 2025-02-25 18:47:33 +08:00
indexing_runner.py fix full-doc mode document doesn't reindex after enable or un_archive (#16737) 2025-03-25 16:26:14 +08:00
model_manager.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
provider_manager.py fix: perferred model provider not match with provider. (#18282) 2025-04-17 15:44:00 +08:00