Unverified Commit 7732bbe4 authored by huangtingwei's avatar huangtingwei Committed by GitHub
Browse files

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


Co-authored-by: default avatarChang Su <chang.s.su@oracle.com>
parent ed0a0b69
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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment