Spaces:
Sleeping
Sleeping
updated to use tools
Browse files
app.py
CHANGED
|
@@ -81,7 +81,12 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 81 |
|
| 82 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 83 |
try:
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
except Exception as e:
|
| 86 |
print(f"Error instantiating agent: {e}")
|
| 87 |
return f"Error initializing agent: {e}", None
|
|
|
|
| 81 |
|
| 82 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 83 |
try:
|
| 84 |
+
tools = {
|
| 85 |
+
"math": MathTool(),
|
| 86 |
+
"google": GoogleSearchTool(api_key="YOUR_KEY", engine_id="YOUR_CX"),
|
| 87 |
+
"wiki": WikipediaTool()
|
| 88 |
+
}
|
| 89 |
+
agent = BasicAgent(tools)
|
| 90 |
except Exception as e:
|
| 91 |
print(f"Error instantiating agent: {e}")
|
| 92 |
return f"Error initializing agent: {e}", None
|