Update agent.py
Browse files
agent.py
CHANGED
|
@@ -173,8 +173,17 @@ def wikipedia_search(query: str) -> str:
|
|
| 173 |
|
| 174 |
search_web = DuckDuckGoSearchRun()
|
| 175 |
query = 'site:en.wikipedia.org/wiki/Mercedes_Sosa "Discography" OR "Studio albums"'
|
| 176 |
-
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
model = build_gemini_llm()
|
| 179 |
tools = [
|
| 180 |
search_web,
|
|
|
|
| 173 |
|
| 174 |
search_web = DuckDuckGoSearchRun()
|
| 175 |
query = 'site:en.wikipedia.org/wiki/Mercedes_Sosa "Discography" OR "Studio albums"'
|
| 176 |
+
try:
|
| 177 |
+
result = search_web.invoke(query)
|
| 178 |
+
|
| 179 |
+
print("SUCCESS")
|
| 180 |
+
print("TYPE:", type(result))
|
| 181 |
+
print("RESULT:", result)
|
| 182 |
+
|
| 183 |
+
except Exception as e:
|
| 184 |
+
print("FAILED")
|
| 185 |
+
print("TYPE:", type(e))
|
| 186 |
+
print("ERROR:", repr(e))
|
| 187 |
model = build_gemini_llm()
|
| 188 |
tools = [
|
| 189 |
search_web,
|