ChenyuRabbitLove
commited on
Commit
•
656a64f
1
Parent(s):
c785d28
Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,8 @@ def respond(
|
|
61 |
message,
|
62 |
history: list[tuple[str, str]],
|
63 |
):
|
64 |
-
messages = [{"role": "system", "content": ''}]
|
65 |
-
messages.append({"role": "user", "content": message})
|
66 |
|
67 |
response = chat_completion_request(messages, tools=tools, tool_choice='auto')
|
68 |
|
@@ -90,9 +90,9 @@ def respond(
|
|
90 |
}
|
91 |
)
|
92 |
second_response = chat_completion_request(messages)
|
93 |
-
messages.append({"role": "assistant", "content": second_response.choices[0].message.content})
|
94 |
return messages
|
95 |
-
messages.append({"role": "assistant", "content": response.choices[0].message.content})
|
96 |
return messages
|
97 |
|
98 |
"""
|
|
|
61 |
message,
|
62 |
history: list[tuple[str, str]],
|
63 |
):
|
64 |
+
messages = [{"role": "system", "content": ['type': 'text', 'text': '']}]
|
65 |
+
messages.append({"role": "user", "content": ['type': 'text', 'text': message]})
|
66 |
|
67 |
response = chat_completion_request(messages, tools=tools, tool_choice='auto')
|
68 |
|
|
|
90 |
}
|
91 |
)
|
92 |
second_response = chat_completion_request(messages)
|
93 |
+
messages.append({"role": "assistant", "content": ['type': 'text', 'text': second_response.choices[0].message.content]})
|
94 |
return messages
|
95 |
+
messages.append({"role": "assistant", "content": ['type': 'text', 'text': response.choices[0].message.content]})
|
96 |
return messages
|
97 |
|
98 |
"""
|