Kackle commited on
Commit
59e894f
·
verified ·
1 Parent(s): c2b33d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -394,15 +394,12 @@ class SlpMultiAgent:
394
 
395
  manager_agent = CodeAgent(
396
  model=model if not isinstance(model, GeminiModel) else OpenAIServerModel(model_id="gpt-3.5-turbo", temperature=0.0, max_tokens=400),
397
- tools=[GoogleSearchTool(), MathTool(), FileProcessorTool(), KnowledgeBaseTool()],
398
- managed_agents=[research_agent, solver_agent],
399
  name="ManagerAgent",
400
- description="Manager with comprehensive tool access and agent coordination.",
401
- additional_authorized_imports=["re", "math", "json", "pandas", "numpy", "requests", "time", "os", "tempfile", "uuid"],
402
- planning_interval=1,
403
  verbosity_level=0,
404
- max_steps=8,
405
- final_answer_checks=[]
406
  )
407
 
408
  # Create a task for the agent run with retry mechanism for rate limits
@@ -417,16 +414,17 @@ class SlpMultiAgent:
417
  lambda: manager_agent.run(f"""
418
  Question: {short_question}
419
 
420
- Answer this question step by step:
421
 
422
- 1. If it's a factual question, use google_search() to find current information
423
- 2. If it's a math problem, use math_calculator() for calculations
424
- 3. Think through the problem logically
425
- 4. Provide a clear, specific answer
 
 
426
 
427
- IMPORTANT: Always end with final_answer("your specific answer")
428
-
429
- Be precise and factual in your response.
430
  """)
431
  )
432
  break # Success, exit retry loop
 
394
 
395
  manager_agent = CodeAgent(
396
  model=model if not isinstance(model, GeminiModel) else OpenAIServerModel(model_id="gpt-3.5-turbo", temperature=0.0, max_tokens=400),
397
+ tools=[GoogleSearchTool(), MathTool()],
 
398
  name="ManagerAgent",
399
+ description="Answer questions using Google search and math tools.",
400
+ additional_authorized_imports=["re", "math", "json", "pandas", "numpy", "requests", "time", "os", "tempfile", "uuid"],
 
401
  verbosity_level=0,
402
+ max_steps=3
 
403
  )
404
 
405
  # Create a task for the agent run with retry mechanism for rate limits
 
414
  lambda: manager_agent.run(f"""
415
  Question: {short_question}
416
 
417
+ Use the available tools to answer this question. Follow this format:
418
 
419
+ Thoughts: [Your reasoning]
420
+ <code>
421
+ # Use tools like:
422
+ result = google_search("your search query")
423
+ # or
424
+ result = math_calculator("your calculation")
425
 
426
+ final_answer("your answer")
427
+ </code>
 
428
  """)
429
  )
430
  break # Success, exit retry loop