bugfix: Prevent global mutation of conv.stop_str across requests (#7347)

Co-authored-by: Chang Su <chang.s.su@oracle.com>
This commit is contained in:
huangtingwei
2025-06-24 10:36:23 +08:00
committed by GitHub
parent ed0a0b692c
commit 7732bbe458

View File

@@ -1,3 +1,4 @@
import copy
import json
import logging
import time
@@ -292,7 +293,7 @@ class OpenAIServingChat(OpenAIServingBase):
image_data = conv.image_data if conv.image_data else None
audio_data = conv.audio_data if conv.audio_data else None
modalities = conv.modalities if conv.modalities else []
stop = conv.stop_str or [] if not request.ignore_eos else []
stop = copy.copy(conv.stop_str or [] if not request.ignore_eos else [])
if request.stop:
if isinstance(request.stop, str):