Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions units/en/unit2/smolagents/code_agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ Running an agent is quite straightforward:
```python
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel

agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())
web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

agent = CodeAgent(tools=[web_search], model=InferenceClientModel())

agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
```
Expand Down Expand Up @@ -286,11 +288,12 @@ class SuperheroPartyThemeTool(Tool):

return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")

web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

# Alfred, the butler, preparing the menu for the party
agent = CodeAgent(
tools=[
DuckDuckGoSearchTool(),
web_search,
VisitWebpageTool(),
suggest_menu,
catering_service_tool,
Expand Down
7 changes: 5 additions & 2 deletions units/es/unit2/smolagents/code_agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ Ejecutar un agente es bastante sencillo:
```python
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel

agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())
web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

agent = CodeAgent(tools=[web_search], model=InferenceClientModel())

agent.run("Busca las mejores recomendaciones de música para una fiesta en la mansión de los Wayne.")
```
Expand Down Expand Up @@ -278,11 +280,12 @@ class SuperheroPartyThemeTool(Tool):

return themes.get(category.lower(), "Idea de fiesta temática no encontrada. Prueba con 'héroes clásicos', 'mascarada de villanos' o 'Gotham futurista'.")

web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

# Alfred, el mayordomo, preparando el menú para la fiesta
agent = CodeAgent(
tools=[
DuckDuckGoSearchTool(),
web_search,
VisitWebpageTool(),
suggest_menu,
catering_service_tool,
Expand Down
7 changes: 5 additions & 2 deletions units/fr/unit2/smolagents/code_agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ Exécuter un agent est assez simple :
```python
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel

agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())
web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

agent = CodeAgent(tools=[web_search], model=InferenceClientModel())

agent.run("Recherche les meilleures recommandations musicales pour une fête au manoir des Wayne.")
```
Expand Down Expand Up @@ -285,11 +287,12 @@ class SuperheroPartyThemeTool(Tool):

return themes.get(category.lower(), "Idée de fête thématique non trouvée. Essayez 'héros classiques', 'mascarade de méchants', ou 'Gotham futuriste'.")

web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

# Alfred, le majordome, préparant le menu pour la fête
agent = CodeAgent(
tools=[
DuckDuckGoSearchTool(),
web_search,
VisitWebpageTool(),
suggest_menu,
catering_service_tool,
Expand Down
7 changes: 5 additions & 2 deletions units/ko/unit2/smolagents/code_agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ login()
```python
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel

agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())
web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

agent = CodeAgent(tools=[web_search], model=InferenceClientModel())

agent.run("웨인 저택에서 열리는 파티에 어울리는 최고의 음악 추천을 검색해줘.")
```
Expand Down Expand Up @@ -284,11 +286,12 @@ class SuperheroPartyThemeTool(Tool):

return themes.get(category.lower(), "테마 파티 아이디어를 찾을 수 없습니다. 'classic heroes', 'villain masquerade', 'futuristic Gotham' 중에서 시도해보세요.")

web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

# Alfred가 파티 메뉴를 준비합니다
agent = CodeAgent(
tools=[
DuckDuckGoSearchTool(),
web_search,
VisitWebpageTool(),
suggest_menu,
catering_service_tool,
Expand Down
7 changes: 5 additions & 2 deletions units/zh-CN/unit2/smolagents/code_agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ login()
```python
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel

agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())
web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

agent = CodeAgent(tools=[web_search], model=InferenceClientModel())

agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
```
Expand Down Expand Up @@ -279,11 +281,12 @@ class SuperheroPartyThemeTool(Tool):

return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")

web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)

# 管家阿尔弗雷德,为派对准备菜单
agent = CodeAgent(
tools=[
DuckDuckGoSearchTool(),
web_search,
VisitWebpageTool(),
suggest_menu,
catering_service_tool,
Expand Down