Skip to content

Commit fe35bfb

Browse files
authored
Merge pull request #2064 from uersula/fix-image-removal-flag-logic
Fix: 移除 _remove_image_from_context中的flag逻辑
2 parents 71290f0 + 8c03e79 commit fe35bfb

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

astrbot/core/provider/sources/openai_source.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,13 +482,8 @@ async def _remove_image_from_context(self, contexts: List):
482482
"""
483483
new_contexts = []
484484

485-
flag = False
486485
for context in contexts:
487-
if flag:
488-
flag = False # 删除 image 后,下一条(LLM 响应)也要删除
489-
continue
490486
if "content" in context and isinstance(context["content"], list):
491-
flag = True
492487
# continue
493488
new_content = []
494489
for item in context["content"]:

0 commit comments

Comments
 (0)