bstraehle commited on
Commit
4f9a1ab
·
verified ·
1 Parent(s): 3427974

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +8 -8
crew.py CHANGED
@@ -40,7 +40,7 @@ def run_crew(question, file_name):
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,7 +51,7 @@ def run_crew(question, file_name):
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,7 +62,7 @@ def run_crew(question, file_name):
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,7 +73,7 @@ def run_crew(question, file_name):
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,8 +84,8 @@ def run_crew(question, file_name):
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
  backstory="As an expert manager assistant, you answer the question. ",
90
  allow_delegation=True,
91
  llm=MANAGER_MODEL,
@@ -123,14 +123,14 @@ 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, Image Analysis Agent, Python Coding Agent, Video Analysis Agent, or Web Search Agent for help. Question: \"{topic}\" ",
127
  expected_output="The answer to the question. "
128
  )
129
 
130
  # Crew
131
 
132
  crew = Crew(
133
- agents=["Image Analysis Agent", "Python Coding Agent", "Video Analysis Agent", "Web Search Agent"],
134
  #planning=True,
135
  manager_agent=manager_agent,
136
  process=Process.hierarchical,
 
40
  # Agents
41
 
42
  image_analysis_agent = Agent(
43
+ role="ImageAnalysisAgent",
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="PythonCodingAgent",
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="VideoAnalysisAgent",
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="WebSearchAgent",
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="ManagerAgent",
88
+ goal="Try to answer the following question. If needed, delegate to **one** of your coworkers, ImageAnalysisAgent, PythonCodingAgent, VideoAnalysisAgent, or WebSearchAgent for help. Question: \"{topic}\" ",
89
  backstory="As an expert manager assistant, you answer the question. ",
90
  allow_delegation=True,
91
  llm=MANAGER_MODEL,
 
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, ImageAnalysisAgent, PythonCodingAgent, VideoAnalysisAgent, or WebSearchAgent for help. Question: \"{topic}\" ",
127
  expected_output="The answer to the question. "
128
  )
129
 
130
  # Crew
131
 
132
  crew = Crew(
133
+ agents=[image_analysis_agent, python_coding_agent, video_analysis_agent, web_search_agent],
134
  #planning=True,
135
  manager_agent=manager_agent,
136
  process=Process.hierarchical,