Spaces:
Paused
Paused
Modularised the agents 10
Browse files- __pycache__/crew.cpython-310.pyc +0 -0
- crew.py +11 -4
__pycache__/crew.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/crew.cpython-310.pyc and b/__pycache__/crew.cpython-310.pyc differ
|
|
|
crew.py
CHANGED
|
@@ -125,14 +125,21 @@ class GAIACrew():
|
|
| 125 |
|
| 126 |
@task
|
| 127 |
def manager_task(self) -> Task:
|
| 128 |
-
|
| 129 |
-
print("👀 Agent config:", agent.config)
|
| 130 |
-
|
| 131 |
task = Task(config=self.tasks_config["manager_task"])
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
return task
|
| 134 |
|
| 135 |
|
|
|
|
| 136 |
def get_crew(self) -> Crew:
|
| 137 |
return Crew(
|
| 138 |
agents=self.agents,
|
|
|
|
| 125 |
|
| 126 |
@task
|
| 127 |
def manager_task(self) -> Task:
|
| 128 |
+
# Build the Task object from your YAML
|
|
|
|
|
|
|
| 129 |
task = Task(config=self.tasks_config["manager_task"])
|
| 130 |
+
|
| 131 |
+
# Find the Agent instance whose YAML key is "manager_agent"
|
| 132 |
+
agent_list = self.agents
|
| 133 |
+
name_list = list(self.agents_config.keys())
|
| 134 |
+
for idx, name in enumerate(name_list):
|
| 135 |
+
if name == "manager_agent":
|
| 136 |
+
task.agent = agent_list[idx]
|
| 137 |
+
break
|
| 138 |
+
|
| 139 |
return task
|
| 140 |
|
| 141 |
|
| 142 |
+
|
| 143 |
def get_crew(self) -> Crew:
|
| 144 |
return Crew(
|
| 145 |
agents=self.agents,
|