Update crew.py
Browse files
crew.py
CHANGED
@@ -9,14 +9,13 @@ from crewai import Agent, Crew, Process, Task
|
|
9 |
from crewai.tools import tool
|
10 |
from google import genai
|
11 |
from google.genai import types
|
12 |
-
from openai import OpenAI
|
13 |
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
14 |
from phoenix.otel import register
|
15 |
from util import read_file, get_final_answer
|
16 |
|
17 |
## LLMs
|
18 |
|
19 |
-
MANAGER_MODEL = "gpt-4.
|
20 |
AGENT_MODEL = "gpt-4.1-mini"
|
21 |
|
22 |
FINAL_ANSWER_MODEL = "gemini-2.5-pro-preview-03-25"
|
@@ -252,7 +251,7 @@ def run_crew(question, file_path):
|
|
252 |
llm=AGENT_MODEL,
|
253 |
max_iter=2,
|
254 |
tools=[web_search_tool],
|
255 |
-
verbose=
|
256 |
)
|
257 |
|
258 |
image_analysis_agent = Agent(
|
@@ -263,7 +262,7 @@ def run_crew(question, file_path):
|
|
263 |
llm=AGENT_MODEL,
|
264 |
max_iter=2,
|
265 |
tools=[image_analysis_tool],
|
266 |
-
verbose=
|
267 |
)
|
268 |
|
269 |
audio_analysis_agent = Agent(
|
@@ -274,7 +273,7 @@ def run_crew(question, file_path):
|
|
274 |
llm=AGENT_MODEL,
|
275 |
max_iter=2,
|
276 |
tools=[audio_analysis_tool],
|
277 |
-
verbose=
|
278 |
)
|
279 |
|
280 |
video_analysis_agent = Agent(
|
@@ -285,7 +284,7 @@ def run_crew(question, file_path):
|
|
285 |
llm=AGENT_MODEL,
|
286 |
max_iter=2,
|
287 |
tools=[video_analysis_tool],
|
288 |
-
verbose=
|
289 |
)
|
290 |
|
291 |
youtube_analysis_agent = Agent(
|
@@ -296,7 +295,7 @@ def run_crew(question, file_path):
|
|
296 |
llm=AGENT_MODEL,
|
297 |
max_iter=2,
|
298 |
tools=[youtube_analysis_tool],
|
299 |
-
verbose=
|
300 |
)
|
301 |
|
302 |
code_generation_agent = Agent(
|
@@ -307,7 +306,7 @@ def run_crew(question, file_path):
|
|
307 |
llm=AGENT_MODEL,
|
308 |
max_iter=3,
|
309 |
tools=[code_generation_tool],
|
310 |
-
verbose=
|
311 |
)
|
312 |
|
313 |
code_execution_agent = Agent(
|
@@ -318,7 +317,7 @@ def run_crew(question, file_path):
|
|
318 |
llm=AGENT_MODEL,
|
319 |
max_iter=3,
|
320 |
tools=[code_execution_tool],
|
321 |
-
verbose=
|
322 |
)
|
323 |
|
324 |
manager_agent = Agent(
|
@@ -328,7 +327,7 @@ def run_crew(question, file_path):
|
|
328 |
allow_delegation=True,
|
329 |
llm=MANAGER_MODEL,
|
330 |
max_iter=5,
|
331 |
-
verbose=
|
332 |
)
|
333 |
|
334 |
# Task
|
|
|
9 |
from crewai.tools import tool
|
10 |
from google import genai
|
11 |
from google.genai import types
|
|
|
12 |
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
13 |
from phoenix.otel import register
|
14 |
from util import read_file, get_final_answer
|
15 |
|
16 |
## LLMs
|
17 |
|
18 |
+
MANAGER_MODEL = "gpt-4.5-preview"
|
19 |
AGENT_MODEL = "gpt-4.1-mini"
|
20 |
|
21 |
FINAL_ANSWER_MODEL = "gemini-2.5-pro-preview-03-25"
|
|
|
251 |
llm=AGENT_MODEL,
|
252 |
max_iter=2,
|
253 |
tools=[web_search_tool],
|
254 |
+
verbose=True
|
255 |
)
|
256 |
|
257 |
image_analysis_agent = Agent(
|
|
|
262 |
llm=AGENT_MODEL,
|
263 |
max_iter=2,
|
264 |
tools=[image_analysis_tool],
|
265 |
+
verbose=True
|
266 |
)
|
267 |
|
268 |
audio_analysis_agent = Agent(
|
|
|
273 |
llm=AGENT_MODEL,
|
274 |
max_iter=2,
|
275 |
tools=[audio_analysis_tool],
|
276 |
+
verbose=True
|
277 |
)
|
278 |
|
279 |
video_analysis_agent = Agent(
|
|
|
284 |
llm=AGENT_MODEL,
|
285 |
max_iter=2,
|
286 |
tools=[video_analysis_tool],
|
287 |
+
verbose=True
|
288 |
)
|
289 |
|
290 |
youtube_analysis_agent = Agent(
|
|
|
295 |
llm=AGENT_MODEL,
|
296 |
max_iter=2,
|
297 |
tools=[youtube_analysis_tool],
|
298 |
+
verbose=True
|
299 |
)
|
300 |
|
301 |
code_generation_agent = Agent(
|
|
|
306 |
llm=AGENT_MODEL,
|
307 |
max_iter=3,
|
308 |
tools=[code_generation_tool],
|
309 |
+
verbose=True
|
310 |
)
|
311 |
|
312 |
code_execution_agent = Agent(
|
|
|
317 |
llm=AGENT_MODEL,
|
318 |
max_iter=3,
|
319 |
tools=[code_execution_tool],
|
320 |
+
verbose=True
|
321 |
)
|
322 |
|
323 |
manager_agent = Agent(
|
|
|
327 |
allow_delegation=True,
|
328 |
llm=MANAGER_MODEL,
|
329 |
max_iter=5,
|
330 |
+
verbose=True
|
331 |
)
|
332 |
|
333 |
# Task
|