Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ class XylariaChat:
|
|
80 |
print(f"Error resetting API client: {e}")
|
81 |
|
82 |
self.save_chat() # Save the empty chat history
|
83 |
-
return None # To clear the chatbot interface
|
84 |
|
85 |
def get_response(self, user_input):
|
86 |
# Prepare messages with conversation context and persistent memory
|
@@ -297,8 +297,8 @@ class XylariaChat:
|
|
297 |
|
298 |
# Clear conversation
|
299 |
clear.click(
|
300 |
-
fn=lambda
|
301 |
-
inputs=
|
302 |
outputs=[chatbot],
|
303 |
queue=False
|
304 |
).then(
|
@@ -320,7 +320,7 @@ class XylariaChat:
|
|
320 |
)
|
321 |
|
322 |
# Load chat history on interface load
|
323 |
-
demo.load(self.reset_conversation,
|
324 |
|
325 |
return demo
|
326 |
|
|
|
80 |
print(f"Error resetting API client: {e}")
|
81 |
|
82 |
self.save_chat() # Save the empty chat history
|
83 |
+
#return None # To clear the chatbot interface
|
84 |
|
85 |
def get_response(self, user_input):
|
86 |
# Prepare messages with conversation context and persistent memory
|
|
|
297 |
|
298 |
# Clear conversation
|
299 |
clear.click(
|
300 |
+
fn=lambda: None,
|
301 |
+
inputs=None,
|
302 |
outputs=[chatbot],
|
303 |
queue=False
|
304 |
).then(
|
|
|
320 |
)
|
321 |
|
322 |
# Load chat history on interface load
|
323 |
+
demo.load(self.reset_conversation, [], None)
|
324 |
|
325 |
return demo
|
326 |
|