eaglelandsonce commited on
Commit
506056f
1 Parent(s): 9e55fde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -24
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
- researcher = Agent(
33
- role='Senior Research Analyst',
34
- goal=f'Uncover cutting-edge developments in {research_topic}',
35
- backstory="""You are a Senior Research Analyst at a leading think tank.
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
- GeminiSearchTools.gemini_search
43
  ]
44
 
45
  )
46
- writer = Agent(
47
- role='Tech Content Strategist',
48
- goal='Craft compelling content on tech advancements',
49
- backstory="""You are a renowned Tech Social Media Content Writer and Strategist, known for your insightful
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"""Conduct a comprehensive analysis of the latest advancements in {research_topic}.
62
- Compile your findings in a detailed report. Your final answer MUST be a full analysis report""",
63
- agent=researcher
64
  )
65
 
66
  task2 = Task(
67
- description="""Using the insights from the researcher's report, develop an engaging blog
68
- post that highlights the most significant advancements.
69
- Your post should be informative yet accessible, catering to a tech-savvy audience.
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=[researcher, writer],
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