at1300 commited on
Commit
a98971b
·
verified ·
1 Parent(s): 7397935

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -24,7 +24,7 @@ class BasicAgent:
24
  with open("prompts.yaml", 'r') as stream:
25
  prompt_templates = yaml.safe_load(stream)
26
 
27
- master_agent = CodeAgent(
28
  tools=[websearchtool, visit_webpage],
29
  model=model,
30
  add_base_tools=True,
@@ -33,9 +33,10 @@ class BasicAgent:
33
  prompt_templates=prompt_templates,
34
  )
35
  print("BasicAgent initialized.")
 
36
  def __call__(self, question: str) -> str:
37
  print(f"Agent received question (first 50 chars): {question[:50]}...")
38
- agent_answer = master_agent.run(question)
39
  print(f"Agent answer: {agent_answer}")
40
  return agent_answer
41
 
 
24
  with open("prompts.yaml", 'r') as stream:
25
  prompt_templates = yaml.safe_load(stream)
26
 
27
+ self.master_agent = CodeAgent(
28
  tools=[websearchtool, visit_webpage],
29
  model=model,
30
  add_base_tools=True,
 
33
  prompt_templates=prompt_templates,
34
  )
35
  print("BasicAgent initialized.")
36
+
37
  def __call__(self, question: str) -> str:
38
  print(f"Agent received question (first 50 chars): {question[:50]}...")
39
+ agent_answer = self.master_agent.run(question)
40
  print(f"Agent answer: {agent_answer}")
41
  return agent_answer
42