https://huggingface.co/spaces/Akjava/Smolagents-ExtraSearchTools
Akjava/Smolagents-ExtraSearchTools
space
resource
https://huggingface.co/spaces/Akjava/Smolagents-ExtraSearchTools
new_line
A tool for executing searches using multiple search tools in a prioritized order,
text
A tool for executing searches using multiple search tools in a prioritized order,
new_line
particularly useful for developers who have experienced rate-limiting issues with
text
particularly useful for developers who have experienced rate-limiting issues with
new_line
DuckDuckGoSearchTool during smolagents development.
text
DuckDuckGoSearchTool during smolagents development.
new_line
new_line
GoogleCustomSearchTool: This tool utilizes the Google Custom Search JSON API to perform web searches. It can be configured to search entire websites, but this requires setting up a Custom Search Engine in the Google Cloud Console. The free tier of the Google Custom Search API is limited to 100 queries per day.
text
GoogleCustomSearchTool: This tool utilizes the Google Custom Search JSON API to perform web searches. It can be configured to search entire websites, but this requires setting up a Custom Search Engine in the Google Cloud Console. The free tier of the Google Custom Search API is limited to 100 queries per day.
new_line
new_line
BraveSearchTool: This tool uses the Brave Search API to perform web searches. While there is a free tier allowing 2000 queries per month, it requires adding payment information. 
text
BraveSearchTool: This tool uses the Brave Search API to perform web searches. While there is a free tier allowing 2000 queries per month, it requires adding payment information. 
new_line
new_line
PrioritySearchTool: This tool manages multiple search tool instances, executing them in a prioritized order. It returns the result from the first search tool that completes successfully, providing a fallback mechanism if higher-priority tools fail.
text
PrioritySearchTool: This tool manages multiple search tool instances, executing them in a prioritized order. It returns the result from the first search tool that completes successfully, providing a fallback mechanism if higher-priority tools fail.
new_line
new_line
save_json_path (optional): This optional parameter specifies the path to a JSON file. If provided, the PrioritySearchTool will cache search queries and their corresponding results to this file. This can improve performance and reduce API usage for repeated queries.
text
save_json_path (optional): This optional parameter specifies the path to a JSON file. If provided, the PrioritySearchTool will cache search queries and their corresponding results to this file. This can improve performance and reduce API usage for repeated queries.
new_line
new_line
Example:
text
Example:
new_line
priority_search = PrioritySearchTool(
text
priority_search = PrioritySearchTool(
new_line
    [DuckDuckGoSearchTool(), GoogleCustomSearchTool("xxxxxx"),BraveSearchTool()],
text
    [DuckDuckGoSearchTool(), GoogleCustomSearchTool("xxxxxx"),BraveSearchTool()],
new_line
    save_json_path="history.json",
text
    save_json_path="history.json",
new_line
)
text
)
https://huggingface.co/spaces/Akjava/Smolagents-ExtraSearchTools
A tool for executing searches using multiple search tools in a prioritized order,
particularly useful for developers who have experienced rate-limiting issues with
DuckDuckGoSearchTool during smolagents development.

GoogleCustomSearchTool: This tool utilizes the Google Custom Search JSON API to perform web searches. It can be configured to search entire websites, but this requires setting up a Custom Search Engine in the Google Cloud Console. The free tier of the Google Custom Search API is limited to 100 queries per day.

BraveSearchTool: This tool uses the Brave Search API to perform web searches. While there is a free tier allowing 2000 queries per month, it requires adding payment information. 

PrioritySearchTool: This tool manages multiple search tool instances, executing them in a prioritized order. It returns the result from the first search tool that completes successfully, providing a fallback mechanism if higher-priority tools fail.

save_json_path (optional): This optional parameter specifies the path to a JSON file. If provided, the PrioritySearchTool will cache search queries and their corresponding results to this file. This can improve performance and reduce API usage for repeated queries.

Example:
priority_search = PrioritySearchTool(
    [DuckDuckGoSearchTool(), GoogleCustomSearchTool("xxxxxx"),BraveSearchTool()],
    save_json_path="history.json",
)
👍
John6666 dantezxcd
😎
John6666 dantezxcd