Spaces:
Running
Running
Mathias Lux
commited on
Commit
·
6d871ae
1
Parent(s):
13e1701
Another try
Browse files
app.py
CHANGED
@@ -33,18 +33,17 @@ def respond(
|
|
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({"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?"})
|
40 |
-
|
41 |
-
|
42 |
for val in history:
|
43 |
if val[0]:
|
44 |
messages.append({"role": "user", "content": val[0]})
|
45 |
if val[1]:
|
46 |
messages.append({"role": "assistant", "content": val[1]})
|
47 |
|
|
|
|
|
|
|
|
|
|
|
48 |
messages.append({"role": "user", "content": message})
|
49 |
|
50 |
response = ""
|
|
|
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 |
|
49 |
response = ""
|