BroBro87 commited on
Commit
8e52166
·
verified ·
1 Parent(s): 5cda2c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -10,26 +10,25 @@ load_dotenv()
10
  llm = ChatOpenAI(model="gpt-4o")
11
 
12
  toolset = ComposioToolSet()
13
- tools = toolset.get_tools(apps=[App.SERPAPI])
14
 
15
  def find_hackernews_posts(message,history):
16
- profile = message
17
 
18
  hacnews_agent = Agent(
19
- role="Technical Researcher",
20
- goal="Find the best technical posts on Hackernews",
21
- backstory="You are a technical person who loves reading Hackernews and looking for technical posts. You spend all your time looking for interesting posts of the day.",
22
  llm=llm,
23
  tools=tools
24
  )
25
 
26
  hacnews_task = Task(
27
  description=f"""
28
- Use the serp tool to search for the user's twitter profile of name {profile} to read his bio,
29
- and then scrape it. Based on his bio, find good technical hackernews posts suited to his bio.
30
- Return one post that is most appropriate to the personality. Make it funny. Return title and link to it.
31
  """,
32
- expected_output="A list of 5 technical hackernews posts with titles and URLs",
33
  agent=hacnews_agent,
34
  tools=tools
35
  )
 
10
  llm = ChatOpenAI(model="gpt-4o")
11
 
12
  toolset = ComposioToolSet()
13
+ tools = toolset.get_tools(apps=[App.SERPAPI, App.WEBTOOL, App.BROWSERTOOL, App.IMAGE_ANALYSER])
14
 
15
  def find_hackernews_posts(message,history):
16
+ input_website = message
17
 
18
  hacnews_agent = Agent(
19
+ role="Web Roaster",
20
+ goal="Roast the website based on content and design",
21
+ backstory="You are a funny website roaster that reads the web content and the image of the website and roasts it.",
22
  llm=llm,
23
  tools=tools
24
  )
25
 
26
  hacnews_task = Task(
27
  description=f"""
28
+ Use the serp tool to search for the website of name {input_website} to read its content and take a screenshot,
29
+ and then roast it. Be insanely funny, make it shareworthy
 
30
  """,
31
+ expected_output="The Website was roasted",
32
  agent=hacnews_agent,
33
  tools=tools
34
  )