- CustomAgent.py +2 -2
CustomAgent.py
CHANGED
|
@@ -46,7 +46,7 @@ Question: {question}
|
|
| 46 |
print("Agent returning actual answer:", result)
|
| 47 |
return result
|
| 48 |
|
| 49 |
-
def websearch(query: str) -> str:
|
| 50 |
"""
|
| 51 |
Performs a web search using an external web search API.
|
| 52 |
Args:
|
|
@@ -62,6 +62,6 @@ Question: {question}
|
|
| 62 |
r.raise_for_status()
|
| 63 |
response = r.text
|
| 64 |
except Exception as e:
|
| 65 |
-
print(e)
|
| 66 |
response = "An error has occurred while using websearch, please inform the user of this"
|
| 67 |
print(f"Agent searched for {query}. Response: {response}")
|
|
|
|
| 46 |
print("Agent returning actual answer:", result)
|
| 47 |
return result
|
| 48 |
|
| 49 |
+
def websearch(self, query: str) -> str:
|
| 50 |
"""
|
| 51 |
Performs a web search using an external web search API.
|
| 52 |
Args:
|
|
|
|
| 62 |
r.raise_for_status()
|
| 63 |
response = r.text
|
| 64 |
except Exception as e:
|
| 65 |
+
print("Error:", e)
|
| 66 |
response = "An error has occurred while using websearch, please inform the user of this"
|
| 67 |
print(f"Agent searched for {query}. Response: {response}")
|