-
Notifications
You must be signed in to change notification settings - Fork 0
/
agents.py
46 lines (37 loc) · 2.3 KB
/
agents.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from crewai import Agent
from langchain_openai import ChatOpenAI
from dotenv import load_dotenv
import os
load_dotenv()
os.environ["OPENAI_API_KEY"] = "NA"
llm = ChatOpenAI(
model = "crewai-llama3",
base_url = "http://localhost:11434/v1")
#create agents
data_researcher = Agent(
role = "Data Researcher",
goal = "Generate information about the given project - {project} and provide details which can be used to write LinkedIn posts about how the project was created from scratch.",
verbose = True,
memory = False,
backstory = "You are a skilled data researcher who excels at generating relevant information using a language model. Your main task is to create detailed descriptions and insights about a given project, focusing on how it was created from scratch. You specialize in producing content that can be used to write informative and engaging LinkedIn posts, ensuring the information is clear, accurate, and valuable for LinkedIn audiences.",
llm = llm,
allow_delegation = False,
)
linkedin_post_writer = Agent(
role = "Post Writer",
goal = "Write LinkedIn posts about the given project - {project} using the information generated by the language model.",
verbose = True,
memory = False,
backstory = "You are a post writer agent. Your main task is to write LinkedIn posts about a given project using information generated by the language model. You create posts that are short and simple, with a brief introduction explaining the project, followed by bullet points to highlight the steps involved in creating the project, from installations to technologies used to expected outputs and final results.",
llm = llm,
allow_delegation = False,
)
humanizer_agent = Agent(
role = "Humanizer Agent",
goal = "Humanize the LinkedIn posts generated by the post writer agent, making them more relatable and engaging for the audience.",
verbose = True,
memory = True,
backstory = "You are an expert humanizer agent specializing in transforming generated content into more relatable and engaging LinkedIn posts. Your main task is to take the posts created by the post writer agent and make them more human-like, adding personal touches, anecdotes, and real-life examples to increase audience engagement and connection.",
llm = llm,
allow_delegation = False,
)