Skip to content

Commit

Permalink
Clean up agent management page
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Aug 15, 2023
1 parent 89e4704 commit 7a39280
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions pages/2-Agent_Management.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,15 @@ def render_extension_settings(extension_settings, agent_settings):
"provider"
] = provider_name # Update the agent_settings with the selected provider
with st.form(key="update_agent_settings_form"):
st.subheader("Provider Settings")
st.subheader("Agent Settings")
if "AUTONOMOUS_EXECUTION" not in agent_settings:
agent_settings["AUTONOMOUS_EXECUTION"] = False
autonomous_execution = st.checkbox(
"Autonomous Execution (If checked, agent will run any enabled commands automatically, if not, it will create a chain of commands it would have executed.)",
value=bool(agent_settings["AUTONOMOUS_EXECUTION"]),
key="AUTONOMOUS_EXECUTION",
)
agent_settings["AUTONOMOUS_EXECUTION"] = autonomous_execution
if "agent_helper_name" in agent_settings:
agent_helper_name = agent_settings["helper_agent_name"]
else:
Expand All @@ -185,6 +193,7 @@ def render_extension_settings(extension_settings, agent_settings):
key="select_helper_agent",
heading="Select Helper Agent (Your agent will ask this one for help when it needs something.)",
)

embedder_name = agent_settings.get("embedder", "default")
embedder_name = st.selectbox(
"Select Embedder",
Expand All @@ -203,15 +212,7 @@ def render_extension_settings(extension_settings, agent_settings):
value=int(agent_settings["WEBSEARCH_TIMEOUT"]),
key="WEBSEARCH_TIMEOUT",
)
# Make a checkbox for autonomous_execution
if "AUTONOMOUS_EXECUTION" not in agent_settings:
agent_settings["AUTONOMOUS_EXECUTION"] = False
autonomous_execution = st.checkbox(
"Autonomous Execution (If checked, agent will run any enabled commands automatically, if not, it will create a chain of commands it would have executed.)",
value=bool(agent_settings["AUTONOMOUS_EXECUTION"]),
key="AUTONOMOUS_EXECUTION",
)
agent_settings["AUTONOMOUS_EXECUTION"] = autonomous_execution
st.subheader("Provider Settings")
if provider_name:
settings = render_provider_settings(
agent_settings=agent_settings, provider_name=provider_name
Expand Down

0 comments on commit 7a39280

Please sign in to comment.