From 8c03e79f99569ff96618e359f63232483e1f2525 Mon Sep 17 00:00:00 2001 From: uersula <2206512436@qq.com> Date: Tue, 8 Jul 2025 23:01:11 +0800 Subject: [PATCH] Fix: Remove buggy flag logic in _remove_image_from_context --- astrbot/core/provider/sources/openai_source.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/astrbot/core/provider/sources/openai_source.py b/astrbot/core/provider/sources/openai_source.py index ec1624776..e44b42612 100644 --- a/astrbot/core/provider/sources/openai_source.py +++ b/astrbot/core/provider/sources/openai_source.py @@ -482,13 +482,8 @@ class ProviderOpenAIOfficial(Provider): """ new_contexts = [] - flag = False for context in contexts: - if flag: - flag = False # 删除 image 后,下一条(LLM 响应)也要删除 - continue if "content" in context and isinstance(context["content"], list): - flag = True # continue new_content = [] for item in context["content"]: