Spaces:
Running
Running
| from crewai import Task | |
| from agents import get_researcher_agent, get_author_agent, get_editor_agent | |
| def get_research_task(model, verbose): | |
| return Task( | |
| description=( | |
| "1. Search the web for content on topic: {topic}.\n" | |
| "2. Scrape the 25 most relevant web sites for content." | |
| ), | |
| expected_output="Content on topic: {topic}.", | |
| agent=get_researcher_agent(model, verbose), | |
| ) | |
| def get_author_task(model, verbose): | |
| return Task( | |
| description=( | |
| "1. Use the content to write an in-depth article on topic: {topic}.\n" | |
| "2. The output must be in markdown format (omit the triple backticks).\n" | |
| "3. At the beginning of the article, add the current date and author: Multi-Agent AI System.\n" | |
| "4. At the end of the article, add a references section with links to content provided by the Researcher.\n" | |
| "5. Include inline references." | |
| ), | |
| expected_output="An article on topic {topic}.", | |
| agent=get_author_agent(model, verbose), | |
| ) | |
| def get_edit_task(model, verbose): | |
| return Task( | |
| description=( | |
| "1. Use the APA Style Guide rules and guidelines to edit an article on topic: {topic}.\n" | |
| "2. The output must be in markdown format (omit the triple backticks)." | |
| ), | |
| expected_output="An editied article on topic {topic}.", | |
| agent=get_editor_agent(model, verbose), | |
| ) |