Update agent.py
Browse files
agent.py
CHANGED
|
@@ -74,9 +74,9 @@ def divide_numbers(a: int, b: int) -> float:
|
|
| 74 |
return a / b
|
| 75 |
|
| 76 |
@tool
|
| 77 |
-
def
|
| 78 |
"""
|
| 79 |
-
Searches the web for the answer to a given question or topic.
|
| 80 |
Args:
|
| 81 |
query (str): the question or topic to search for.
|
| 82 |
"""
|
|
@@ -227,7 +227,6 @@ def wikipedia_search(query: str):
|
|
| 227 |
|
| 228 |
|
| 229 |
model = build_gemini_llm()
|
| 230 |
-
web_search = DuckDuckGoSearchRun()
|
| 231 |
tools = [
|
| 232 |
add_numbers,
|
| 233 |
subtract_numbers,
|
|
@@ -235,7 +234,7 @@ tools = [
|
|
| 235 |
divide_numbers,
|
| 236 |
extract_text_from_image,
|
| 237 |
download_and_read_file,
|
| 238 |
-
|
| 239 |
wikipedia_search
|
| 240 |
]
|
| 241 |
|
|
|
|
| 74 |
return a / b
|
| 75 |
|
| 76 |
@tool
|
| 77 |
+
def web_search(query:str) -> str:
|
| 78 |
"""
|
| 79 |
+
Searches the web for the answer to a given question or topic using DuckDuckGoSearchRun.
|
| 80 |
Args:
|
| 81 |
query (str): the question or topic to search for.
|
| 82 |
"""
|
|
|
|
| 227 |
|
| 228 |
|
| 229 |
model = build_gemini_llm()
|
|
|
|
| 230 |
tools = [
|
| 231 |
add_numbers,
|
| 232 |
subtract_numbers,
|
|
|
|
| 234 |
divide_numbers,
|
| 235 |
extract_text_from_image,
|
| 236 |
download_and_read_file,
|
| 237 |
+
web_search,
|
| 238 |
wikipedia_search
|
| 239 |
]
|
| 240 |
|