Spaces:
Paused
Paused
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -319,6 +319,7 @@ class GAIACrew():
|
|
| 319 |
@agent
|
| 320 |
def web_search_agent(self) -> Agent:
|
| 321 |
return Agent(
|
|
|
|
| 322 |
allow_delegation=False,
|
| 323 |
llm=AGENT_MODEL,
|
| 324 |
max_iter=2,
|
|
@@ -329,6 +330,7 @@ class GAIACrew():
|
|
| 329 |
@agent
|
| 330 |
def image_analysis_agent(self) -> Agent:
|
| 331 |
return Agent(
|
|
|
|
| 332 |
allow_delegation=False,
|
| 333 |
llm=AGENT_MODEL,
|
| 334 |
max_iter=2,
|
|
@@ -339,6 +341,7 @@ class GAIACrew():
|
|
| 339 |
@agent
|
| 340 |
def audio_analysis_agent(self) -> Agent:
|
| 341 |
return Agent(
|
|
|
|
| 342 |
allow_delegation=False,
|
| 343 |
llm=AGENT_MODEL,
|
| 344 |
max_iter=2,
|
|
@@ -349,6 +352,7 @@ class GAIACrew():
|
|
| 349 |
@agent
|
| 350 |
def video_analysis_agent(self) -> Agent:
|
| 351 |
return Agent(
|
|
|
|
| 352 |
allow_delegation=False,
|
| 353 |
llm=AGENT_MODEL,
|
| 354 |
max_iter=2,
|
|
@@ -359,6 +363,7 @@ class GAIACrew():
|
|
| 359 |
@agent
|
| 360 |
def youtube_analysis_agent(self) -> Agent:
|
| 361 |
return Agent(
|
|
|
|
| 362 |
allow_delegation=False,
|
| 363 |
llm=AGENT_MODEL,
|
| 364 |
max_iter=2,
|
|
@@ -369,6 +374,7 @@ class GAIACrew():
|
|
| 369 |
@agent
|
| 370 |
def document_analysis_agent(self) -> Agent:
|
| 371 |
return Agent(
|
|
|
|
| 372 |
allow_delegation=False,
|
| 373 |
llm=AGENT_MODEL,
|
| 374 |
max_iter=2,
|
|
@@ -377,18 +383,20 @@ class GAIACrew():
|
|
| 377 |
)
|
| 378 |
|
| 379 |
@agent
|
| 380 |
-
def
|
| 381 |
return Agent(
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
|
|
|
| 388 |
|
| 389 |
@agent
|
| 390 |
def code_execution_agent(self) -> Agent:
|
| 391 |
return Agent(
|
|
|
|
| 392 |
allow_delegation=False,
|
| 393 |
llm=AGENT_MODEL,
|
| 394 |
max_iter=3,
|
|
@@ -399,6 +407,7 @@ class GAIACrew():
|
|
| 399 |
@agent
|
| 400 |
def code_generation_agent(self) -> Agent:
|
| 401 |
return Agent(
|
|
|
|
| 402 |
allow_delegation=False,
|
| 403 |
llm=AGENT_MODEL,
|
| 404 |
max_iter=3,
|
|
@@ -409,16 +418,17 @@ class GAIACrew():
|
|
| 409 |
@agent
|
| 410 |
def manager_agent(self) -> Agent:
|
| 411 |
return Agent(
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
|
|
|
| 417 |
|
| 418 |
@task
|
| 419 |
def manager_task(self) -> Task:
|
| 420 |
return Task(
|
| 421 |
-
config=self.tasks_config[
|
| 422 |
)
|
| 423 |
|
| 424 |
@crew
|
|
|
|
| 319 |
@agent
|
| 320 |
def web_search_agent(self) -> Agent:
|
| 321 |
return Agent(
|
| 322 |
+
config=self.agents_config["web_search_agent"],
|
| 323 |
allow_delegation=False,
|
| 324 |
llm=AGENT_MODEL,
|
| 325 |
max_iter=2,
|
|
|
|
| 330 |
@agent
|
| 331 |
def image_analysis_agent(self) -> Agent:
|
| 332 |
return Agent(
|
| 333 |
+
config=self.agents_config["image_analysis_agent"],
|
| 334 |
allow_delegation=False,
|
| 335 |
llm=AGENT_MODEL,
|
| 336 |
max_iter=2,
|
|
|
|
| 341 |
@agent
|
| 342 |
def audio_analysis_agent(self) -> Agent:
|
| 343 |
return Agent(
|
| 344 |
+
config=self.agents_config["audio_analysis_agent"],
|
| 345 |
allow_delegation=False,
|
| 346 |
llm=AGENT_MODEL,
|
| 347 |
max_iter=2,
|
|
|
|
| 352 |
@agent
|
| 353 |
def video_analysis_agent(self) -> Agent:
|
| 354 |
return Agent(
|
| 355 |
+
config=self.agents_config["video_analysis_agent"],
|
| 356 |
allow_delegation=False,
|
| 357 |
llm=AGENT_MODEL,
|
| 358 |
max_iter=2,
|
|
|
|
| 363 |
@agent
|
| 364 |
def youtube_analysis_agent(self) -> Agent:
|
| 365 |
return Agent(
|
| 366 |
+
config=self.agents_config["youtube_analysis_agent"],
|
| 367 |
allow_delegation=False,
|
| 368 |
llm=AGENT_MODEL,
|
| 369 |
max_iter=2,
|
|
|
|
| 374 |
@agent
|
| 375 |
def document_analysis_agent(self) -> Agent:
|
| 376 |
return Agent(
|
| 377 |
+
config=self.agents_config["document_analysis_agent"],
|
| 378 |
allow_delegation=False,
|
| 379 |
llm=AGENT_MODEL,
|
| 380 |
max_iter=2,
|
|
|
|
| 383 |
)
|
| 384 |
|
| 385 |
@agent
|
| 386 |
+
def document_analysis_agent(self) -> Agent:
|
| 387 |
return Agent(
|
| 388 |
+
config=self.agents_config["document_analysis_agent"],
|
| 389 |
+
allow_delegation=False,
|
| 390 |
+
llm=AGENT_MODEL,
|
| 391 |
+
max_iter=2,
|
| 392 |
+
tools=[arithmetic_tool],
|
| 393 |
+
verbose=True
|
| 394 |
+
)
|
| 395 |
|
| 396 |
@agent
|
| 397 |
def code_execution_agent(self) -> Agent:
|
| 398 |
return Agent(
|
| 399 |
+
config=self.agents_config["code_execution_agent"],
|
| 400 |
allow_delegation=False,
|
| 401 |
llm=AGENT_MODEL,
|
| 402 |
max_iter=3,
|
|
|
|
| 407 |
@agent
|
| 408 |
def code_generation_agent(self) -> Agent:
|
| 409 |
return Agent(
|
| 410 |
+
config=self.agents_config["code_generation_agent"],
|
| 411 |
allow_delegation=False,
|
| 412 |
llm=AGENT_MODEL,
|
| 413 |
max_iter=3,
|
|
|
|
| 418 |
@agent
|
| 419 |
def manager_agent(self) -> Agent:
|
| 420 |
return Agent(
|
| 421 |
+
config=self.agents_config["manager_agent"],
|
| 422 |
+
allow_delegation=True,
|
| 423 |
+
llm=MANAGER_MODEL,
|
| 424 |
+
max_iter=5,
|
| 425 |
+
verbose=True
|
| 426 |
+
)
|
| 427 |
|
| 428 |
@task
|
| 429 |
def manager_task(self) -> Task:
|
| 430 |
return Task(
|
| 431 |
+
config=self.tasks_config["manager_task"]
|
| 432 |
)
|
| 433 |
|
| 434 |
@crew
|