buitu0 commited on
Commit
562adbd
·
verified ·
1 Parent(s): e8793b1

Upload 2 files

Browse files
Files changed (2) hide show
  1. agent.py +6 -6
  2. manager.py +2 -2
agent.py CHANGED
@@ -12,13 +12,13 @@ class GeminiAgent:
12
  self.client = genai.Client(api_key=key)
13
  self.system_instruction = system_instruction
14
  self.models = [
15
- "gemini-1.5-flash-latest",
16
- "gemini-1.5-flash-002",
17
- "gemini-1.5-flash-001",
18
- "gemini-1.5-flash",
19
- "gemini-1.5-flash-8b",
20
  "gemini-2.5-flash",
21
- "gemini-2.0-flash"
 
 
 
 
 
22
  ]
23
 
24
  def generate_content(self, prompt):
 
12
  self.client = genai.Client(api_key=key)
13
  self.system_instruction = system_instruction
14
  self.models = [
 
 
 
 
 
15
  "gemini-2.5-flash",
16
+ "gemini-2.5-pro",
17
+ "gemini-2.0-flash",
18
+ "gemini-2.0-flash-lite",
19
+ "gemini-2.0-pro",
20
+ "gemini-1.5-pro",
21
+ "gemini-1.5-flash"
22
  ]
23
 
24
  def generate_content(self, prompt):
manager.py CHANGED
@@ -31,7 +31,7 @@ def generate_tour_script(api_key, location, interests, duration):
31
  script = expert_agent.generate_content(expert_prompt)
32
  expert_scripts[matched_key] = script
33
  # Sleep to avoid 429 Too Many Requests
34
- time.sleep(2)
35
 
36
  if not expert_scripts:
37
  # Fallback if planner outputs something weird
@@ -39,7 +39,7 @@ def generate_tour_script(api_key, location, interests, duration):
39
  expert_agent = GeminiAgent(api_key, system_instruction=HISTORICAL_PROMPT)
40
  script = expert_agent.generate_content(f"Provide historical overview for: {location}")
41
  expert_scripts["History"] = script
42
- time.sleep(2)
43
 
44
  # Step 3: Orchestrator
45
  orchestrator = GeminiAgent(api_key, system_instruction=ORCHESTRATOR_PROMPT)
 
31
  script = expert_agent.generate_content(expert_prompt)
32
  expert_scripts[matched_key] = script
33
  # Sleep to avoid 429 Too Many Requests
34
+ time.sleep(5)
35
 
36
  if not expert_scripts:
37
  # Fallback if planner outputs something weird
 
39
  expert_agent = GeminiAgent(api_key, system_instruction=HISTORICAL_PROMPT)
40
  script = expert_agent.generate_content(f"Provide historical overview for: {location}")
41
  expert_scripts["History"] = script
42
+ time.sleep(5)
43
 
44
  # Step 3: Orchestrator
45
  orchestrator = GeminiAgent(api_key, system_instruction=ORCHESTRATOR_PROMPT)