Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,20 @@ hub_stats_tool = HubStatsTool()
|
|
21 |
# Load the guest dataset and initialize the guest info tool
|
22 |
guest_info_tool = load_guest_dataset()
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
# Create Alfred with all the tools
|
25 |
alfred = CodeAgent(
|
26 |
tools=[guest_info_tool, weather_info_tool, hub_stats_tool, search_tool],
|
27 |
model=model,
|
28 |
add_base_tools=True, # Add any additional base tools
|
29 |
-
planning_interval=3 # Enable planning every 3 steps
|
|
|
30 |
)
|
31 |
|
32 |
if __name__ == "__main__":
|
|
|
21 |
# Load the guest dataset and initialize the guest info tool
|
22 |
guest_info_tool = load_guest_dataset()
|
23 |
|
24 |
+
|
25 |
+
# Do not allow use some base tools from smolagents
|
26 |
+
|
27 |
+
from smolagents.prompts import CODE_SYSTEM_PROMPT
|
28 |
+
modified_system_prompt = CODE_SYSTEM_PROMPT + "\nAlways use tools that you are provided, do not use tools VisitWebpageTool and DuckDuckGoSearchTool from base toolbox." #
|
29 |
+
|
30 |
+
|
31 |
# Create Alfred with all the tools
|
32 |
alfred = CodeAgent(
|
33 |
tools=[guest_info_tool, weather_info_tool, hub_stats_tool, search_tool],
|
34 |
model=model,
|
35 |
add_base_tools=True, # Add any additional base tools
|
36 |
+
planning_interval=3, # Enable planning every 3 steps
|
37 |
+
system_prompt=modified_system_prompt
|
38 |
)
|
39 |
|
40 |
if __name__ == "__main__":
|