From 6cf169f4f2d221578cd700220d70e3659255384a Mon Sep 17 00:00:00 2001 From: piexian <64474352+piexian@users.noreply.github.com> Date: Mon, 17 Nov 2025 09:52:31 +0800 Subject: [PATCH] fix: ImageURLPart typo (#3665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复新版本更新对不上格式的问题 entities.py生成的格式:{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}} ImageURLPart期望的格式:{"type": "image_url", "image_url": "data:image/jpeg;base64,..."} * Revert "修复新版本更新对不上格式的问题" This reverts commit 28b479139150ede732c58ea58540a4c141407728. * fix(core.agent): 修复ImageURLPart的声明,修复pydantic校验失败的问题。 --------- Co-authored-by: piexian Co-authored-by: Dt8333 --- astrbot/core/agent/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/agent/message.py b/astrbot/core/agent/message.py index 11128c0f6..4a2e1b149 100644 --- a/astrbot/core/agent/message.py +++ b/astrbot/core/agent/message.py @@ -76,7 +76,7 @@ class ImageURLPart(ContentPart): """The ID of the image, to allow LLMs to distinguish different images.""" type: str = "image_url" - image_url: str + image_url: ImageURL class AudioURLPart(ContentPart):