-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrash.txt
59 lines (49 loc) · 1.97 KB
/
crash.txt
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from crewai import Process, Agent, Task, Crew
from firecrawl_tool import scrapping_function
from langchain_google_genai import ChatGoogleGenerativeAI
from loading_env import google_api_key
input_url = input('Enter the URL: ')
scraped_data = scrapping_function(input_url)
GenAI = ChatGoogleGenerativeAI(
model='gemini-1.5-flash',
google_api_key=google_api_key
)
file_reader = Agent(
role='Senior JavaScript Object Notation Data Reader',
goal=f'Effectively the entire read json data from {scraped_data} and extract important information',
backstory="""You are a expert json data reader.""",
llm = GenAI
)
file_reader_task = Task(
description='Read the scraped data JSON data and extract important information.',
expected_output='Must add all these details Business Name, Industry, Services, Location, Contact Info, etc and save the entire data in the output file',
agent=file_reader,
output_file='basic_info.md'
)
def icp_reader():
with open('basic_info.md', 'r', encoding='utf-8') as file:
icp_info = file.read()
return icp_info
icp_info = icp_reader()
icp_generator_agent = Agent(
role='Senior ICP Generator Agent',
goal = f'Give me the target audience for {icp_info} industry for Ideal customer profile',
backstory="""You are an expert icp generator that can generate detailed Ideal customer profile""",
# verbose=True,
llm=GenAI
)
icp_generator_task = Task(
description="""Give me the target audience for industry for Ideal customer profile also add goegraphic loaction, pain points etc.
""",
expected_output='Generate the Ideal Customer Profile from the data and only save the ICP data in the output file make some bullet points and make a clear document',
agent=icp_generator_agent,
output_file='icp_data.md',
)
crew = Crew(
agents=[file_reader, icp_generator_agent],
tasks=[file_reader_task ,icp_generator_task],
verbose=1,
process=Process.sequential
)
result = crew.kickoff()
print(result)