albertCHY commited on
Commit
965fd41
·
verified ·
1 Parent(s): 22ea62c

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +11 -2
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
- result = search_web.invoke(query)
177
- print(result)
 
 
 
 
 
 
 
 
 
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,