Update multi_agent.py
Browse files- multi_agent.py +31 -18
multi_agent.py
CHANGED
@@ -96,28 +96,41 @@ def create_graph(model, max_tokens, temperature, topic):
|
|
96 |
)
|
97 |
|
98 |
content_planner_agent = create_agent(llm, [tavily_tool, today_tool], system_prompt=
|
99 |
-
"You are a
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
content_planner_node = functools.partial(agent_node, agent=content_planner_agent, name="Content Planner")
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
article_author_node = functools.partial(agent_node, agent=article_author_agent, name="Article Author")
|
114 |
|
115 |
-
article_editor_agent = create_agent(llm, [tavily_tool
|
116 |
-
"You are
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
121 |
article_editor_node = functools.partial(agent_node, agent=article_editor_agent, name="Article Editor")
|
122 |
###
|
123 |
|
|
|
96 |
)
|
97 |
|
98 |
content_planner_agent = create_agent(llm, [tavily_tool, today_tool], system_prompt=
|
99 |
+
"You are a Content Planner working on planning a blog article "
|
100 |
+
"about the topic: {topic}."
|
101 |
+
"You collect information that helps the "
|
102 |
+
"audience learn something "
|
103 |
+
"and make informed decisions. "
|
104 |
+
"Your work is the basis for "
|
105 |
+
"the Content Writer to write an article on this topic.")
|
106 |
content_planner_node = functools.partial(agent_node, agent=content_planner_agent, name="Content Planner")
|
107 |
|
108 |
+
article_author_agent = create_agent(llm, [tavily_tool], system_prompt=
|
109 |
+
"You are an Article Writer working on writing "
|
110 |
+
"a new opinion piece about the topic: {topic}. "
|
111 |
+
"You base your writing on the work of "
|
112 |
+
"the Content Planner, who provides an outline "
|
113 |
+
"and relevant context about the topic. "
|
114 |
+
"You follow the main objectives and "
|
115 |
+
"direction of the outline, "
|
116 |
+
"as provide by the Content Planner. "
|
117 |
+
"You also provide objective and impartial insights "
|
118 |
+
"and back them up with information "
|
119 |
+
"provide by the Content Planner. "
|
120 |
+
"You acknowledge in your opinion piece "
|
121 |
+
"when your statements are opinions "
|
122 |
+
"as opposed to objective statements.")
|
123 |
article_author_node = functools.partial(agent_node, agent=article_author_agent, name="Article Author")
|
124 |
|
125 |
+
article_editor_agent = create_agent(llm, [tavily_tool], system_prompt=
|
126 |
+
"You are an Article Editor who receives a blog post "
|
127 |
+
"from the Content Writer. "
|
128 |
+
"Your goal is to review the blog post "
|
129 |
+
"to ensure that it follows journalistic best practices,"
|
130 |
+
"provides balanced viewpoints "
|
131 |
+
"when providing opinions or assertions, "
|
132 |
+
"and also avoids major controversial topics "
|
133 |
+
"or opinions when possible.")
|
134 |
article_editor_node = functools.partial(agent_node, agent=article_editor_agent, name="Article Editor")
|
135 |
###
|
136 |
|