-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagents_creator.py
More file actions
29 lines (24 loc) · 1.04 KB
/
agents_creator.py
File metadata and controls
29 lines (24 loc) · 1.04 KB
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
from crewai import Agent
import warnings
from tools import get_pdf_search_tool
warnings.filterwarnings('ignore')
def get_ai_expert_agent(ai_document):
ai_expert_agent = Agent(
role="AI Knowledge Consultant",
goal=f"Provide accurate information on AI-related topics using using the tools at your disposal.",
backstory=f"You're an AI expert with access to {ai_document}. Answer questions based on this document.",
allow_delegation=False,
tools=[get_pdf_search_tool(ai_document)],
verbose=True,
)
return ai_expert_agent
def get_python_expert_agent(python_document):
python_expert_agent = Agent(
role="Python Programming Specialist",
goal=f"Assist with Python programming tasks using the tools at your disposal.",
backstory=f"You're a Python developer with access to {python_document}. Answer questions based on this document.",
allow_delegation=False,
tools=[get_pdf_search_tool(python_document)],
verbose=True,
)
return python_expert_agent