Spaces:
Runtime error
Runtime error
Add system prompt, add correct stop tokens
#2
by
Sadmank
- opened
app.py
CHANGED
|
@@ -86,9 +86,12 @@ def stream_response(message, history, max_tokens, temperature, top_p):
|
|
| 86 |
"messages": messages,
|
| 87 |
"max_tokens": max_tokens,
|
| 88 |
"temperature": temperature,
|
|
|
|
| 89 |
"top_p": top_p,
|
| 90 |
"stream": True,
|
| 91 |
-
"stop": ["
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
debug_print(f"Sending request to API: {API_URL}")
|
|
|
|
| 86 |
"messages": messages,
|
| 87 |
"max_tokens": max_tokens,
|
| 88 |
"temperature": temperature,
|
| 89 |
+
"system" : "You are a world-class AI system, capable of complex reasoning and reflection. Reason through the query inside <thinking> tags, and then provide your final response inside <output> tags. If you detect that you made a mistake in your reasoning at any point, correct yourself inside <reflection> tags.",
|
| 90 |
"top_p": top_p,
|
| 91 |
"stream": True,
|
| 92 |
+
"stop": [ "<|start_header_id|>",
|
| 93 |
+
"<|end_header_id|>",
|
| 94 |
+
"<|eot_id|>"] # Add stop sequence
|
| 95 |
}
|
| 96 |
|
| 97 |
debug_print(f"Sending request to API: {API_URL}")
|