jesusvilela commited on
Commit
253ad37
·
verified ·
1 Parent(s): 4bbc320

Update web_ui.py

Browse files
Files changed (1) hide show
  1. web_ui.py +3 -9
web_ui.py CHANGED
@@ -25,20 +25,14 @@ class WebUI:
25
  """
26
  chatbot_config = chatbot_config or {}
27
 
28
- # Fetch API key from environment variables
29
- self.api_key = os.getenv("API_KEY")
30
- if not self.api_key:
31
- raise ValueError("API_KEY environment variable is not set. Please configure it in the environment.")
32
-
33
- # Pass the API key to the agent(s)
34
  if isinstance(agent, MultiAgentHub):
35
- self.agent_list = [self._initialize_agent(a) for a in agent.nonuser_agents]
36
  self.agent_hub = agent
37
  elif isinstance(agent, list):
38
- self.agent_list = [self._initialize_agent(a) for a in agent]
39
  self.agent_hub = None
40
  else:
41
- self.agent_list = [self._initialize_agent(agent)]
42
  self.agent_hub = None
43
 
44
  user_name = chatbot_config.get('user.name', 'User')
 
25
  """
26
  chatbot_config = chatbot_config or {}
27
 
 
 
 
 
 
 
28
  if isinstance(agent, MultiAgentHub):
29
+ self.agent_list = [agent for agent in agent.nonuser_agents]
30
  self.agent_hub = agent
31
  elif isinstance(agent, list):
32
+ self.agent_list = agent
33
  self.agent_hub = None
34
  else:
35
+ self.agent_list = [agent]
36
  self.agent_hub = None
37
 
38
  user_name = chatbot_config.get('user.name', 'User')