-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathagents.py
More file actions
42 lines (33 loc) · 1001 Bytes
/
agents.py
File metadata and controls
42 lines (33 loc) · 1001 Bytes
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
from crewai import Agent
from tools import yt_tool
import os
from dotenv import load_dotenv
load_dotenv()
os.environ['OPENAI_API_KEY'] = os.getenv('OPENAI_API_KEY')
os.environ['OPENAI_MODEL_NAME'] = "gpt-4o-mini"
# Researcher Agent
blog_researcher = Agent(
role = "Blog Researcher",
goal = "Get the relevant video content for the topic {topic} from the YT channel",
verbose = True,
memory = True,
backstory = (
"You are an expert in understanding videos in the AI Data Science, ML and Gen AI space."
),
tools = [yt_tool],
allow_delegation = True
)
# Content Writer Agent
blog_writer = Agent(
role = "Blog Writer",
goal = "Narrate compelling stories about the video {topic} from YT channel",
verbose = True,
memory = True,
backstory = (
"""
You are expert in simplifying complex topics and craft engagin narratives that captivate and educate.
"""
),
tools = [yt_tool],
allow_delegation = False
)