Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ co = cohere.Client(cohere_api_key)
|
|
31 |
@tool('DuckDuckGoSearchResults')
|
32 |
def search_results(search_query: str) -> dict:
|
33 |
"""
|
34 |
-
Performs a web search
|
35 |
This tool automates the retrieval of web-based information related to a specified query.
|
36 |
Args:
|
37 |
- search_query (str): The query string that specifies the information to be searched on the web. This should be a clear and concise expression of the user's information needs.
|
@@ -48,8 +48,7 @@ def web_scrapper(url: str, topic: str) -> str:
|
|
48 |
"""
|
49 |
A tool designed to extract and read the content of a specified link and generate a summary on a specific topic.
|
50 |
It is capable of handling various types of web pages by making HTTP requests and parsing the received HTML content.
|
51 |
-
This tool
|
52 |
-
or extracting specific information from websites.
|
53 |
|
54 |
Args:
|
55 |
- url (str): The URL from which to scrape content.
|
@@ -84,11 +83,6 @@ def web_scrapper(url: str, topic: str) -> str:
|
|
84 |
|
85 |
def kickoff_crew(topic: str) -> dict:
|
86 |
try:
|
87 |
-
"""Kickoff the research process for a given topic using CrewAI components."""
|
88 |
-
# Retrieve the API key from the environment variables
|
89 |
-
groq_api_key = os.environ.get("GROQ_API_KEY")
|
90 |
-
if not groq_api_key:
|
91 |
-
raise ValueError("API Key for Groq is not set in environment variables")
|
92 |
|
93 |
# Initialize the large language models
|
94 |
groq_llm_70b = ChatGroq(temperature=0, groq_api_key=groq_api_key, model_name="llama3-70b-8192")
|
|
|
31 |
@tool('DuckDuckGoSearchResults')
|
32 |
def search_results(search_query: str) -> dict:
|
33 |
"""
|
34 |
+
Performs a web search to gather and return a collection of search results.
|
35 |
This tool automates the retrieval of web-based information related to a specified query.
|
36 |
Args:
|
37 |
- search_query (str): The query string that specifies the information to be searched on the web. This should be a clear and concise expression of the user's information needs.
|
|
|
48 |
"""
|
49 |
A tool designed to extract and read the content of a specified link and generate a summary on a specific topic.
|
50 |
It is capable of handling various types of web pages by making HTTP requests and parsing the received HTML content.
|
51 |
+
This tool is particularly useful for web scraping tasks, data collection, or extracting specific information from websites.
|
|
|
52 |
|
53 |
Args:
|
54 |
- url (str): The URL from which to scrape content.
|
|
|
83 |
|
84 |
def kickoff_crew(topic: str) -> dict:
|
85 |
try:
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
# Initialize the large language models
|
88 |
groq_llm_70b = ChatGroq(temperature=0, groq_api_key=groq_api_key, model_name="llama3-70b-8192")
|