Spaces:
Runtime error
Runtime error
Mathias Lux
commited on
Commit
·
c303f34
1
Parent(s):
6d871ae
Next try
Browse files
app.py
CHANGED
|
@@ -33,16 +33,17 @@ def respond(
|
|
| 33 |
):
|
| 34 |
messages = [{"role": "system", "content": system_message}]
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
for val in history:
|
| 37 |
if val[0]:
|
| 38 |
messages.append({"role": "user", "content": val[0]})
|
| 39 |
if val[1]:
|
| 40 |
messages.append({"role": "assistant", "content": val[1]})
|
| 41 |
|
| 42 |
-
# Add initial system message if history is empty
|
| 43 |
-
if not history:
|
| 44 |
-
# history.append({"role": "system", "content": "Hello! I'm ready to assist you."})
|
| 45 |
-
history.append({"role": "assistant", "content":"Welcome to the interview. I want to write a short biography about you and need some input from your side. Can you please start by stating your name and talking about your early childhood?"})
|
| 46 |
|
| 47 |
messages.append({"role": "user", "content": message})
|
| 48 |
|
|
|
|
| 33 |
):
|
| 34 |
messages = [{"role": "system", "content": system_message}]
|
| 35 |
|
| 36 |
+
# Add initial system message if history is empty
|
| 37 |
+
if not history:
|
| 38 |
+
# history.append({"role": "system", "content": "Hello! I'm ready to assist you."})
|
| 39 |
+
history.append(None, "Welcome to the interview. I want to write a short biography about you and need some input from your side. Can you please start by stating your name and talking about your early childhood?")
|
| 40 |
+
|
| 41 |
for val in history:
|
| 42 |
if val[0]:
|
| 43 |
messages.append({"role": "user", "content": val[0]})
|
| 44 |
if val[1]:
|
| 45 |
messages.append({"role": "assistant", "content": val[1]})
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
messages.append({"role": "user", "content": message})
|
| 49 |
|