Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: handle document fetching from URL in Anthropic LLM model, solving base64 decoding error (#11858)

Kalo Chin2681bafb76dc
diff --git a/api/core/model_runtime/model_providers/anthropic/llm/llm.py b/api/core/model_runtime/model_providers/anthropic/llm/llm.py
index e1d35ff872a..c0ea8c6325c 100644
--- a/api/core/model_runtime/model_providers/anthropic/llm/llm.py
+++ b/api/core/model_runtime/model_providers/anthropic/llm/llm.py
@@ -531,7 +531,7 @@ class AnthropicLargeLanguageModel(LargeLanguageModel):
"source": {
"type": "base64",
"media_type": message_content.mime_type,
- "data": message_content.data,
+ "data": message_content.base64_data,
},
}
sub_messages.append(sub_message_dict)