Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 17 |
|
| 18 |
hacnews_agent = Agent(
|
| 19 |
-
role="
|
| 20 |
-
goal="
|
| 21 |
-
backstory="You are a
|
| 22 |
llm=llm,
|
| 23 |
tools=tools
|
| 24 |
)
|
| 25 |
|
| 26 |
hacnews_task = Task(
|
| 27 |
description=f"""
|
| 28 |
-
Use the serp tool to search for the
|
| 29 |
-
and then
|
| 30 |
-
Return one post that is most appropriate to the personality. Make it funny. Return title and link to it.
|
| 31 |
""",
|
| 32 |
-
expected_output="
|
| 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 |
)
|