LCA commited on
Commit
38f1367
·
verified ·
1 Parent(s): 8943bcc

Add stop condition on chat generation

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -163,6 +163,7 @@ def respond(message):
163
  stream=True,
164
  temperature=0.05, # Très faible pour plus de déterminisme
165
  top_p=0.3, # Plus restrictif
 
166
  ):
167
  token = chunk.choices[0].delta.content
168
  if token:
 
163
  stream=True,
164
  temperature=0.05, # Très faible pour plus de déterminisme
165
  top_p=0.3, # Plus restrictif
166
+ stop=["\n\n", "USER:", "Assistant:", "###"]
167
  ):
168
  token = chunk.choices[0].delta.content
169
  if token: