Spaces:
Sleeping
Sleeping
include sys prompt as user message
Browse files
app.py
CHANGED
@@ -197,8 +197,14 @@ def bot(message, history, oai_key, system_prompt, seed, temperature, max_tokens,
|
|
197 |
|
198 |
history_openai_format = []
|
199 |
user_msg_parts = []
|
200 |
-
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
for human, assi in history:
|
203 |
if human is not None:
|
204 |
if type(human) is tuple:
|
|
|
197 |
|
198 |
history_openai_format = []
|
199 |
user_msg_parts = []
|
200 |
+
|
201 |
+
if system_prompt:
|
202 |
+
if not (model == "o1-mini" or model == "o1-preview"):
|
203 |
+
role = "system"
|
204 |
+
else:
|
205 |
+
role = "user"
|
206 |
+
history_openai_format.append({"role": role, "content": system_prompt})
|
207 |
+
|
208 |
for human, assi in history:
|
209 |
if human is not None:
|
210 |
if type(human) is tuple:
|