Agents team, better prompts, WIP
This commit is contained in:
@@ -45,7 +45,6 @@ from urllib.parse import quote_plus
|
||||
from tqdm import tqdm
|
||||
from tabulate import tabulate
|
||||
from pytrends.request import TrendReq
|
||||
from wordcloud import WordCloud
|
||||
from loguru import logger
|
||||
|
||||
# Configure logger
|
||||
|
||||
@@ -74,7 +74,8 @@ def do_tavily_ai_search(search_keywords):
|
||||
logger.info(f"Doing Tavily AI search for: {search_keywords}")
|
||||
t_results = get_tavilyai_results(search_keywords)
|
||||
t_titles = tavily_extract_information(t_results, 'titles')
|
||||
return(t_results, t_titles)
|
||||
t_answer = tavily_extract_information(t_results, 'answer')
|
||||
return(t_results, t_titles, t_answer)
|
||||
except Exception as err:
|
||||
logger.error(f"Failed to do Tavily AI Search: {err}")
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ def get_tavilyai_results(keywords):
|
||||
|
||||
|
||||
def print_result_table(output_data):
|
||||
""" Pretty print the tavily AI serch result. """
|
||||
""" Pretty print the tavily AI search result. """
|
||||
# Prepare data for tabulate
|
||||
table_data = []
|
||||
for item in output_data.get("results"):
|
||||
|
||||
Reference in New Issue
Block a user