Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,24 +88,24 @@ def respond(
|
|
88 |
|
89 |
messages = BasicChatHistory()
|
90 |
|
91 |
-
for msn in history:
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
stream = agent.get_chat_response(
|
104 |
message,
|
105 |
llm_sampling_settings=settings,
|
106 |
chat_history=messages,
|
107 |
returns_streaming_generator=True,
|
108 |
-
print_output=
|
109 |
)
|
110 |
|
111 |
outputs = ""
|
|
|
88 |
|
89 |
messages = BasicChatHistory()
|
90 |
|
91 |
+
# for msn in history:
|
92 |
+
# user = {
|
93 |
+
# 'role': Roles.user,
|
94 |
+
# 'content': msn[0]
|
95 |
+
# }
|
96 |
+
# assistant = {
|
97 |
+
# 'role': Roles.assistant,
|
98 |
+
# 'content': msn[1]
|
99 |
+
# }
|
100 |
+
# messages.add_message(user)
|
101 |
+
# messages.add_message(assistant)
|
102 |
|
103 |
stream = agent.get_chat_response(
|
104 |
message,
|
105 |
llm_sampling_settings=settings,
|
106 |
chat_history=messages,
|
107 |
returns_streaming_generator=True,
|
108 |
+
print_output=True
|
109 |
)
|
110 |
|
111 |
outputs = ""
|