Remove references to transformers.agents in doc and examples

This commit is contained in:
Aymeric 2025-01-06 14:02:58 +01:00
parent d7044343b6
commit f3c4edb073
3 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ def sql_engine(query: str) -> str:
Now let us create an agent that leverages this tool.
We use the `CodeAgent`, which is transformers.agents main agent class: an agent that writes actions in code and can iterate on previous output according to the ReAct framework.
We use the `CodeAgent`, which is smolagents main agent class: an agent that writes actions in code and can iterate on previous output according to the ReAct framework.
The model is the LLM that powers the agent system. HfApiModel allows you to call LLMs using HFs Inference API, either via Serverless or Dedicated endpoint, but you could also use any proprietary API.

View File

@ -176,7 +176,7 @@ Transformers comes with a default toolbox for empowering agents, that you can ad
You can manually use a tool by calling the [`load_tool`] function and a task to perform.
```python
from transformers import load_tool
from smolagents import load_tool
search_tool = load_tool("web_search")
print(search_tool("Who's the current president of Russia?"))
@ -202,7 +202,7 @@ This code can quickly be converted into a tool, just by wrapping it in a functio
```py
from transformers import tool
from smolagents import tool
@tool
def model_download_tool(task: str) -> str:

View File

@ -213,7 +213,7 @@ You can leverage tool collections by using the ToolCollection object, with the s
Then pass them as a list to initialize you agent, and start using them!
```py
from transformers import ToolCollection, CodeAgent
from smolagents import ToolCollection, CodeAgent
image_tool_collection = ToolCollection(
collection_slug="huggingface-tools/diffusion-tools-6630bb19a942c2306a2cdb6f",