"vscode:/vscode.git/clone" did not exist on "f4fc75035f2d567dfe00fc6b8671ecd38dd144b2"
Unverified Commit c4e9ebe3 authored by Liangsheng Yin's avatar Liangsheng Yin Committed by GitHub
Browse files

Fix stop str merging (#225)


Co-authored-by: default avatarEnrique Shockwave <33002121+qeternity@users.noreply.github.com>
parent 3c2c5869
......@@ -583,6 +583,10 @@ class StreamExecutor:
if self.chat_template.stop_str:
if not clone:
clone = self.default_sampling_para.clone()
if clone.stop == ():
clone.stop = []
elif isinstance(clone.stop, str):
clone.stop = [clone.stop]
clone.stop += self.chat_template.stop_str
return clone or self.default_sampling_para
......
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