Spaces:
Sleeping
Sleeping
Add stop condition on chat generation
Browse files
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:
|