Spaces:
Sleeping
Sleeping
chore: tavily less search results but bigger window
Browse files
tools.py
CHANGED
|
@@ -75,7 +75,7 @@ def print_tool_response(response: str):
|
|
| 75 |
)
|
| 76 |
|
| 77 |
|
| 78 |
-
search_tool = TavilySearch(max_results=
|
| 79 |
extract_tool = TavilyExtract()
|
| 80 |
|
| 81 |
|
|
@@ -83,7 +83,7 @@ extract_tool = TavilyExtract()
|
|
| 83 |
def search_and_extract(query: str) -> list[dict]:
|
| 84 |
"""Performs a web search and returns structured content extracted from top results."""
|
| 85 |
time.sleep(3) # To avoid hitting the API rate limit in the llm-apis when calling the tool multiple times in a row.
|
| 86 |
-
MAX_NUMBER_OF_CHARS =
|
| 87 |
|
| 88 |
if CUSTOM_DEBUG:
|
| 89 |
print_tool_call(
|
|
|
|
| 75 |
)
|
| 76 |
|
| 77 |
|
| 78 |
+
search_tool = TavilySearch(max_results=3)
|
| 79 |
extract_tool = TavilyExtract()
|
| 80 |
|
| 81 |
|
|
|
|
| 83 |
def search_and_extract(query: str) -> list[dict]:
|
| 84 |
"""Performs a web search and returns structured content extracted from top results."""
|
| 85 |
time.sleep(3) # To avoid hitting the API rate limit in the llm-apis when calling the tool multiple times in a row.
|
| 86 |
+
MAX_NUMBER_OF_CHARS = 15_000
|
| 87 |
|
| 88 |
if CUSTOM_DEBUG:
|
| 89 |
print_tool_call(
|