Merge pull request #2064 from uersula/fix-image-removal-flag-logic

Fix: 移除 _remove_image_from_context中的flag逻辑
This commit is contained in:
Soulter
2025-07-09 12:00:30 +08:00
committed by GitHub

View File

@@ -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"]: