eaglelandsonce
commited on
Commit
•
506056f
1
Parent(s):
9e55fde
Update app.py
Browse files
app.py
CHANGED
@@ -29,52 +29,48 @@ gemini_llm = GoogleGenerativeAI(model="gemini-pro", google_api_key=GOOGLE_AI_STU
|
|
29 |
|
30 |
def crewai_process(research_topic):
|
31 |
# Define your agents with roles and goals
|
32 |
-
|
33 |
-
role='
|
34 |
-
goal=f'
|
35 |
-
backstory="""
|
36 |
-
Your expertise lies in identifying emerging trends. You have a knack for dissecting complex data and presenting
|
37 |
-
actionable insights.""",
|
38 |
verbose=True,
|
39 |
allow_delegation=False,
|
40 |
llm = gemini_llm,
|
41 |
tools=[
|
42 |
-
|
43 |
]
|
44 |
|
45 |
)
|
46 |
-
|
47 |
-
role='
|
48 |
-
goal='
|
49 |
-
backstory="""
|
50 |
-
and engaging articles on technology and innovation. With a deep understanding of
|
51 |
-
the tech industry and how people are impacted by it, you transform complex concepts into compelling narratives.""",
|
52 |
verbose=True,
|
53 |
allow_delegation=True,
|
54 |
-
llm = gemini_llm
|
|
|
|
|
|
|
55 |
|
56 |
# Add tools and other optional parameters as needed
|
57 |
)
|
58 |
|
59 |
# Create tasks for your agents
|
60 |
task1 = Task(
|
61 |
-
description=f"""
|
62 |
-
|
63 |
-
agent=
|
64 |
)
|
65 |
|
66 |
task2 = Task(
|
67 |
-
description="""
|
68 |
-
|
69 |
-
|
70 |
-
Aim for a narrative that captures the essence of these breakthroughs and their
|
71 |
-
implications for the future. Your final answer MUST be the full blog post of at least 3 paragraphs.""",
|
72 |
-
agent=writer
|
73 |
)
|
74 |
|
75 |
# Instantiate your crew with a sequential process
|
76 |
crew = Crew(
|
77 |
-
agents=[
|
78 |
tasks=[task1, task2],
|
79 |
verbose=2,
|
80 |
process=Process.sequential
|
|
|
29 |
|
30 |
def crewai_process(research_topic):
|
31 |
# Define your agents with roles and goals
|
32 |
+
crazy1 = Agent(
|
33 |
+
role='Homeless Person',
|
34 |
+
goal=f'Discuss issue with {research_topic} and come to a deeper understanding',
|
35 |
+
backstory="""Not doing well mentally living on the street""",
|
|
|
|
|
36 |
verbose=True,
|
37 |
allow_delegation=False,
|
38 |
llm = gemini_llm,
|
39 |
tools=[
|
40 |
+
MixtralSearchTools.mixtral_crazy
|
41 |
]
|
42 |
|
43 |
)
|
44 |
+
crazy2 = Agent(
|
45 |
+
role='Distressed Mom',
|
46 |
+
goal='Resond to answers',
|
47 |
+
backstory="""Struggling with depression and loss of a child""",
|
|
|
|
|
48 |
verbose=True,
|
49 |
allow_delegation=True,
|
50 |
+
llm = gemini_llm,
|
51 |
+
tools=[
|
52 |
+
MixtralSearchTools.mixtral_crazy
|
53 |
+
]
|
54 |
|
55 |
# Add tools and other optional parameters as needed
|
56 |
)
|
57 |
|
58 |
# Create tasks for your agents
|
59 |
task1 = Task(
|
60 |
+
description=f"""Discuss the {query}. Use Mixtral
|
61 |
+
do 10 rounds of chat with """,
|
62 |
+
agent=crazy1
|
63 |
)
|
64 |
|
65 |
task2 = Task(
|
66 |
+
description=f"""Discuss the {query}. Use Mixtral
|
67 |
+
do 10 rounds of chat with """,
|
68 |
+
agent=crazy2
|
|
|
|
|
|
|
69 |
)
|
70 |
|
71 |
# Instantiate your crew with a sequential process
|
72 |
crew = Crew(
|
73 |
+
agents=[crazy1, crazy2],
|
74 |
tasks=[task1, task2],
|
75 |
verbose=2,
|
76 |
process=Process.sequential
|