Update app.py
Browse files
app.py
CHANGED
|
@@ -89,6 +89,16 @@ class BasicAgent:
|
|
| 89 |
}
|
| 90 |
|
| 91 |
def search_tool(question: str, max_length: int = 1024) -> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
search = DuckDuckGoSearchRun()
|
| 93 |
return search.invoke(question)[:max_length]
|
| 94 |
|
|
|
|
| 89 |
}
|
| 90 |
|
| 91 |
def search_tool(question: str, max_length: int = 1024) -> str:
|
| 92 |
+
"""
|
| 93 |
+
Search info in the web.
|
| 94 |
+
|
| 95 |
+
Args:
|
| 96 |
+
question: Question string
|
| 97 |
+
max_length: Maximum length of response (default 1024 chars)
|
| 98 |
+
|
| 99 |
+
Returns:
|
| 100 |
+
A single string containing the info from the web.
|
| 101 |
+
"""
|
| 102 |
search = DuckDuckGoSearchRun()
|
| 103 |
return search.invoke(question)[:max_length]
|
| 104 |
|