Spaces:
Sleeping
Sleeping
crcdng
commited on
Commit
·
f08457f
1
Parent(s):
abe49b2
wire reset
Browse files- Gradio_UI.py +3 -1
Gradio_UI.py
CHANGED
|
@@ -278,7 +278,8 @@ class GradioUI:
|
|
| 278 |
return self.agent.tools
|
| 279 |
|
| 280 |
def agent_reset(self):
|
| 281 |
-
self.agent
|
|
|
|
| 282 |
|
| 283 |
def agent_set_steps(self, steps):
|
| 284 |
self.agent.max_steps = steps
|
|
@@ -347,6 +348,7 @@ class GradioUI:
|
|
| 347 |
steps_input.change(self.agent_set_steps, steps_input, None)
|
| 348 |
gr.Dropdown(choices=self.agent_get_tools(), label="Tools (display only)")
|
| 349 |
reset = gr.Button(value="Reset Agent")
|
|
|
|
| 350 |
text_input = gr.Textbox(lines=1, label="Chat Message")
|
| 351 |
text_input.submit(
|
| 352 |
self.log_user_message,
|
|
|
|
| 278 |
return self.agent.tools
|
| 279 |
|
| 280 |
def agent_reset(self):
|
| 281 |
+
self.agent.memory.reset()
|
| 282 |
+
self.agent.monitor.reset()
|
| 283 |
|
| 284 |
def agent_set_steps(self, steps):
|
| 285 |
self.agent.max_steps = steps
|
|
|
|
| 348 |
steps_input.change(self.agent_set_steps, steps_input, None)
|
| 349 |
gr.Dropdown(choices=self.agent_get_tools(), label="Tools (display only)")
|
| 350 |
reset = gr.Button(value="Reset Agent")
|
| 351 |
+
reset.click(self.agent_reset, None, None)
|
| 352 |
text_input = gr.Textbox(lines=1, label="Chat Message")
|
| 353 |
text_input.submit(
|
| 354 |
self.log_user_message,
|