You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: units/en/unit2/smolagents/code_agents.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ login()
80
80
81
81
### Selecting a Playlist for the Party Using `smolagents`
82
82
83
-
Music is an essential part of a successful party! Alfred needs some help selecting the playlist. Luckily, `smolagents` has got us covered! We can build an agent capable of searching the web using DuckDuckGo. To give the agent access to this tool, we include it in the tool list when creating the agent.
83
+
Music is an essential part of a successful party! Alfred needs some help selecting the playlist. Luckily, `smolagents` has got us covered! We can build an agent capable of searching the web using our native `WebSearchTool` tool. To give the agent access to this tool, we include it in the tool list when creating the agent.
agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
97
97
```
@@ -224,7 +224,7 @@ For example, the _AlfredAgent_ is available [here](https://huggingface.co/spaces
224
224
You may be wondering—how did Alfred build such an agent using `smolagents`? By integrating several tools, he can generate an agent as follows. Don't worry about the tools for now, as we'll have a dedicated section later in this unit to explore that in detail:
225
225
226
226
```python
227
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool, InferenceClientModel, Tool, tool, VisitWebpageTool
227
+
from smolagents import CodeAgent, WebSearchTool, FinalAnswerTool, InferenceClientModel, Tool, tool, VisitWebpageTool
228
228
229
229
@tool
230
230
defsuggest_menu(occasion: str) -> str:
@@ -290,7 +290,7 @@ class SuperheroPartyThemeTool(Tool):
290
290
# Alfred, the butler, preparing the menu for the party
0 commit comments