Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
@@ -9,7 +9,7 @@ from state import AgentState
|
|
9 |
from langchain.schema import HumanMessage
|
10 |
import regex as re
|
11 |
import time
|
12 |
-
from duckduckgo_search import
|
13 |
|
14 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
15 |
|
@@ -50,7 +50,7 @@ def web_search_tool(state: AgentState) -> AgentState:
|
|
50 |
if not query:
|
51 |
return {} # nothing to do
|
52 |
|
53 |
-
|
54 |
max_retries = 5
|
55 |
result_text = ""
|
56 |
|
|
|
9 |
from langchain.schema import HumanMessage
|
10 |
import regex as re
|
11 |
import time
|
12 |
+
from duckduckgo_search import DDGS
|
13 |
|
14 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
15 |
|
|
|
50 |
if not query:
|
51 |
return {} # nothing to do
|
52 |
|
53 |
+
ddg = DDGS()
|
54 |
max_retries = 5
|
55 |
result_text = ""
|
56 |
|