dify/api/core/model_runtime/entities
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: PromptMessage is not an abstract base class (#15965) 2025-03-18 10:57:52 +08:00
common_entities.py chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
defaults.py fix: autocorrect everything in api (#17859) 2025-04-11 15:24:39 +08:00
llm_entities.py feat: re-add prompt messages to result and chunks in llm (#17883) 2025-04-11 17:04:49 +08:00
message_entities.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
model_entities.py feat: structured output (#17877) 2025-04-18 16:33:53 +08:00
provider_entities.py 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
rerank_entities.py chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
text_embedding_entities.py chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00