crcdng commited on
Commit
901cfbb
·
1 Parent(s): b9c9310

tools dropdown

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +9 -2
Gradio_UI.py CHANGED
@@ -274,7 +274,13 @@ class GradioUI:
274
  "",
275
  )
276
 
277
- def set_agent_steps(self, steps):
 
 
 
 
 
 
278
  self.agent.max_steps = steps
279
 
280
  def launch(self, **kwargs):
@@ -337,7 +343,8 @@ class GradioUI:
337
  [upload_status, file_uploads_log],
338
  )
339
  with gr.Row():
340
- steps_input = gr.Slider(0, 12, value=4, step=1, label="Max. Number of Steps")
 
341
  reset = gr.Button(value="Reset Agent")
342
  text_input = gr.Textbox(lines=1, label="Chat Message")
343
  text_input.submit(
 
274
  "",
275
  )
276
 
277
+ def agent_get_tools(self):
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
285
 
286
  def launch(self, **kwargs):
 
343
  [upload_status, file_uploads_log],
344
  )
345
  with gr.Row():
346
+ steps_input = gr.Slider(1, 12, value=4, step=1, label="Max. Number of Steps")
347
+ gr.Dropdown(choices=agent_get_tools(), label="Tools (display only)")
348
  reset = gr.Button(value="Reset Agent")
349
  text_input = gr.Textbox(lines=1, label="Chat Message")
350
  text_input.submit(