Update crew.py
Browse files
crew.py
CHANGED
|
@@ -40,7 +40,7 @@ def run_crew(question, file_name):
|
|
| 40 |
# Agents
|
| 41 |
|
| 42 |
image_analysis_agent = Agent(
|
| 43 |
-
role="
|
| 44 |
goal="Analyze image to help answer question \"{topic}\". ",
|
| 45 |
backstory="As an expert image analysis assistant, you analyze the image to help answer the question. ",
|
| 46 |
allow_delegation=False,
|
|
@@ -51,7 +51,7 @@ def run_crew(question, file_name):
|
|
| 51 |
)
|
| 52 |
|
| 53 |
python_coding_agent = Agent(
|
| 54 |
-
role="
|
| 55 |
goal="Write and/or execute Python code to help answer question \"{topic}\". ",
|
| 56 |
backstory="As an expert Python coding assistant, you write and/or execute Python code to help answer the question. ",
|
| 57 |
allow_delegation=False,
|
|
@@ -62,7 +62,7 @@ def run_crew(question, file_name):
|
|
| 62 |
)
|
| 63 |
|
| 64 |
video_analysis_agent = Agent(
|
| 65 |
-
role="
|
| 66 |
goal="Analyze video to help answer question \"{topic}\". ",
|
| 67 |
backstory="As an expert video analysis assistant, you analyze the video to help answer the question. ",
|
| 68 |
allow_delegation=False,
|
|
@@ -73,7 +73,7 @@ def run_crew(question, file_name):
|
|
| 73 |
)
|
| 74 |
|
| 75 |
web_search_agent = Agent(
|
| 76 |
-
role="
|
| 77 |
goal="Search the web to help answer question \"{topic}\", then scrape the most relevant web page. ",
|
| 78 |
backstory="As an expert web search assistant, you search the web to help answer the question. ",
|
| 79 |
allow_delegation=False,
|
|
@@ -84,8 +84,9 @@ def run_crew(question, file_name):
|
|
| 84 |
)
|
| 85 |
|
| 86 |
manager_agent = Agent(
|
| 87 |
-
role="
|
| 88 |
-
goal="Try to answer the following question. If needed, delegate to **one** of your coworkers,
|
|
|
|
| 89 |
backstory="As an expert manager assistant, you answer the question. ",
|
| 90 |
allow_delegation=True,
|
| 91 |
llm=MANAGER_MODEL,
|
|
@@ -123,7 +124,7 @@ def run_crew(question, file_name):
|
|
| 123 |
|
| 124 |
manager_task = Task(
|
| 125 |
agent=manager_agent,
|
| 126 |
-
description="Try to answer the following question. If needed, delegate to **one** of your coworkers
|
| 127 |
expected_output="The answer to the question. "
|
| 128 |
)
|
| 129 |
|
|
|
|
| 40 |
# Agents
|
| 41 |
|
| 42 |
image_analysis_agent = Agent(
|
| 43 |
+
role="image_analysis_agent",
|
| 44 |
goal="Analyze image to help answer question \"{topic}\". ",
|
| 45 |
backstory="As an expert image analysis assistant, you analyze the image to help answer the question. ",
|
| 46 |
allow_delegation=False,
|
|
|
|
| 51 |
)
|
| 52 |
|
| 53 |
python_coding_agent = Agent(
|
| 54 |
+
role="python_coding_agent",
|
| 55 |
goal="Write and/or execute Python code to help answer question \"{topic}\". ",
|
| 56 |
backstory="As an expert Python coding assistant, you write and/or execute Python code to help answer the question. ",
|
| 57 |
allow_delegation=False,
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
video_analysis_agent = Agent(
|
| 65 |
+
role="video_analysis_agent",
|
| 66 |
goal="Analyze video to help answer question \"{topic}\". ",
|
| 67 |
backstory="As an expert video analysis assistant, you analyze the video to help answer the question. ",
|
| 68 |
allow_delegation=False,
|
|
|
|
| 73 |
)
|
| 74 |
|
| 75 |
web_search_agent = Agent(
|
| 76 |
+
role="web_search_agent",
|
| 77 |
goal="Search the web to help answer question \"{topic}\", then scrape the most relevant web page. ",
|
| 78 |
backstory="As an expert web search assistant, you search the web to help answer the question. ",
|
| 79 |
allow_delegation=False,
|
|
|
|
| 84 |
)
|
| 85 |
|
| 86 |
manager_agent = Agent(
|
| 87 |
+
role="manager_agent",
|
| 88 |
+
#goal="Try to answer the following question. If needed, delegate to **one** of your coworkers, image_analysis_agent, python_coding_agent, video_analysis_agent, or web_search_agent for help. Question: \"{topic}\" ",
|
| 89 |
+
goal="Try to answer the following question. If needed, delegate to **one** of your coworkers for help. Question: \"{topic}\" ",
|
| 90 |
backstory="As an expert manager assistant, you answer the question. ",
|
| 91 |
allow_delegation=True,
|
| 92 |
llm=MANAGER_MODEL,
|
|
|
|
| 124 |
|
| 125 |
manager_task = Task(
|
| 126 |
agent=manager_agent,
|
| 127 |
+
description="Try to answer the following question. If needed, delegate to **one** of your coworkers for help. Question: \"{topic}\" ",
|
| 128 |
expected_output="The answer to the question. "
|
| 129 |
)
|
| 130 |
|