Kackle commited on
Commit
61c5634
·
verified ·
1 Parent(s): 21b42b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -11,7 +11,8 @@ import json
11
  import boto3
12
  from smolagents import FinalAnswerTool, Tool, tool, OpenAIServerModel, DuckDuckGoSearchTool, CodeAgent, VisitWebpageTool
13
  from nova_agent import NovaProAgent
14
- from gemini_agent import GeminiAgent
 
15
 
16
  from dotenv import load_dotenv
17
 
@@ -91,11 +92,10 @@ class SlpMultiAgent:
91
  short_question = question # [:MAX_QUESTION_LENGTH]
92
 
93
  # Use cheaper, faster model
94
- model = OpenAIServerModel(
95
- model_id="gpt-3.5-turbo",
96
- temperature=0.0, # Deterministic for consistency
97
- max_tokens=400 # Reduced tokens for cost efficiency
98
- )
99
 
100
  # Create only essential agents with reduced complexity
101
  research_agent = CodeAgent(
@@ -229,7 +229,7 @@ async def run_and_submit_all(profile):
229
 
230
  # 1. Instantiate Agent ( modify this part to create your agent)
231
  try:
232
- agent = GeminiAgent()
233
  except Exception as e:
234
  print(f"Error instantiating agent: {e}")
235
  return f"Error initializing agent: {e}", None
 
11
  import boto3
12
  from smolagents import FinalAnswerTool, Tool, tool, OpenAIServerModel, DuckDuckGoSearchTool, CodeAgent, VisitWebpageTool
13
  from nova_agent import NovaProAgent
14
+
15
+ import google.generativeai as genai
16
 
17
  from dotenv import load_dotenv
18
 
 
92
  short_question = question # [:MAX_QUESTION_LENGTH]
93
 
94
  # Use cheaper, faster model
95
+ api_key = os.getenv('GOOGLE_API_KEY')
96
+ genai.configure(api_key=api_key)
97
+
98
+ model = genai.GenerativeModel('gemini-2.0-flash-exp')
 
99
 
100
  # Create only essential agents with reduced complexity
101
  research_agent = CodeAgent(
 
229
 
230
  # 1. Instantiate Agent ( modify this part to create your agent)
231
  try:
232
+ agent = SlpMultiAgent()
233
  except Exception as e:
234
  print(f"Error instantiating agent: {e}")
235
  return f"Error initializing agent: {e}", None