From 2681bafb76dc3488cfc3d6305b9ada6a63597f9c Mon Sep 17 00:00:00 2001 From: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:23:42 +0900 Subject: [PATCH] fix: handle document fetching from URL in Anthropic LLM model, solving base64 decoding error (#11858) --- api/core/model_runtime/model_providers/anthropic/llm/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e1d35ff872..c0ea8c6325 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)