Spaces:
Build error
Build error
Update agents.py
Browse files
agents.py
CHANGED
|
@@ -29,18 +29,7 @@ class ContentAgents:
|
|
| 29 |
def planner_agent(self, topic):
|
| 30 |
return Agent(
|
| 31 |
role='Senior Content Planner',
|
| 32 |
-
goal=f'
|
| 33 |
-
backstory=f"""You're working on planning a research article about the topic: {topic}. You collect information that helps the audience
|
| 34 |
-
learn something and make informed decisions. Your work is the basis for the Content Writer to write an article on this topic.
|
| 35 |
-
The structure of the blog post should include:
|
| 36 |
-
1. Introduction
|
| 37 |
-
2. Application
|
| 38 |
-
3. Definition and Architecture
|
| 39 |
-
4. How it Works
|
| 40 |
-
5. Comparison with Other Similar Apps
|
| 41 |
-
6. References
|
| 42 |
-
7. Images to support the content
|
| 43 |
-
""",
|
| 44 |
llm=self.llm,
|
| 45 |
tools=[web_scraper_tool],
|
| 46 |
allow_delegation=False,
|
|
@@ -49,10 +38,7 @@ class ContentAgents:
|
|
| 49 |
def researcher_agent(self, topic):
|
| 50 |
return Agent(
|
| 51 |
role='Market and Domain Research Analyst',
|
| 52 |
-
goal=f'Provide up-to-date
|
| 53 |
-
backstory=f"""You are an expert analyst with a keen eye for market trends. Based on the comprehensive content plan provided by
|
| 54 |
-
the Planner, you do web searches on the topic {topic} in order to find compelling images as well as provide precise and up-to-date
|
| 55 |
-
domain knowledge. Your work is the basis for the Content Writer to write an article on this topic.""",
|
| 56 |
llm=self.llm,
|
| 57 |
tools=[web_scraper_tool],
|
| 58 |
allow_delegation=False,
|
|
@@ -61,24 +47,7 @@ class ContentAgents:
|
|
| 61 |
def writer_agent(self, topic):
|
| 62 |
return Agent(
|
| 63 |
role='Senior Content Writer',
|
| 64 |
-
goal=f'
|
| 65 |
-
backstory=f"""You are a skilled writer with years of experience. You're working on writing a new opinion piece about the
|
| 66 |
-
topic: {topic}. You base your writing on the work of the Content Planner, who provides an outline and relevant context about
|
| 67 |
-
the topic, and the work of the Content Researcher, who provides the domain knowledge and related images about the topic.
|
| 68 |
-
The structure of the blog post should include:
|
| 69 |
-
1. Introduction
|
| 70 |
-
2. Application
|
| 71 |
-
3. Definition and Architecture
|
| 72 |
-
4. How it Works
|
| 73 |
-
5. Comparison with Other Similar Apps
|
| 74 |
-
6. References
|
| 75 |
-
7. Images to support the content
|
| 76 |
-
|
| 77 |
-
You follow the main objectives and direction of the outline, as provided by the Content Planner. You leverage the domain
|
| 78 |
-
knowledge and images that come from the Content Researcher. You also provide authentic, objective, and impartial insights and
|
| 79 |
-
back them up with information provided by the Content Researcher. You acknowledge in your opinion piece when your statements
|
| 80 |
-
are opinions as opposed to objective statements. You avoid plagiarism, you provide references for your citations, and mention
|
| 81 |
-
attribution to the images/information coming from others.""",
|
| 82 |
llm=self.llm,
|
| 83 |
tools=[image_search_tool],
|
| 84 |
allow_delegation=False,
|
|
|
|
| 29 |
def planner_agent(self, topic):
|
| 30 |
return Agent(
|
| 31 |
role='Senior Content Planner',
|
| 32 |
+
goal=f'Create a detailed and structured content plan for a blog post about {topic} that will guide further content creation steps.',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
llm=self.llm,
|
| 34 |
tools=[web_scraper_tool],
|
| 35 |
allow_delegation=False,
|
|
|
|
| 38 |
def researcher_agent(self, topic):
|
| 39 |
return Agent(
|
| 40 |
role='Market and Domain Research Analyst',
|
| 41 |
+
goal=f'Provide accurate and up-to-date domain knowledge and image references for the topic {topic} to support content creation.',
|
|
|
|
|
|
|
|
|
|
| 42 |
llm=self.llm,
|
| 43 |
tools=[web_scraper_tool],
|
| 44 |
allow_delegation=False,
|
|
|
|
| 47 |
def writer_agent(self, topic):
|
| 48 |
return Agent(
|
| 49 |
role='Senior Content Writer',
|
| 50 |
+
goal=f'Write a high-quality, engaging, and informative blog post on {topic}, based on the content plan and research provided.',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
llm=self.llm,
|
| 52 |
tools=[image_search_tool],
|
| 53 |
allow_delegation=False,
|