Remove references to transformers.agents in doc and examples
This commit is contained in:
parent
d7044343b6
commit
f3c4edb073
|
@ -122,7 +122,7 @@ def sql_engine(query: str) -> str:
|
||||||
|
|
||||||
Now let us create an agent that leverages this tool.
|
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 HF’s Inference API, either via Serverless or Dedicated endpoint, but you could also use any proprietary API.
|
The model is the LLM that powers the agent system. HfApiModel allows you to call LLMs using HF’s Inference API, either via Serverless or Dedicated endpoint, but you could also use any proprietary API.
|
||||||
|
|
||||||
|
|
|
@ -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.
|
You can manually use a tool by calling the [`load_tool`] function and a task to perform.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from transformers import load_tool
|
from smolagents import load_tool
|
||||||
|
|
||||||
search_tool = load_tool("web_search")
|
search_tool = load_tool("web_search")
|
||||||
print(search_tool("Who's the current president of Russia?"))
|
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
|
```py
|
||||||
from transformers import tool
|
from smolagents import tool
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def model_download_tool(task: str) -> str:
|
def model_download_tool(task: str) -> str:
|
||||||
|
|
|
@ -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!
|
Then pass them as a list to initialize you agent, and start using them!
|
||||||
|
|
||||||
```py
|
```py
|
||||||
from transformers import ToolCollection, CodeAgent
|
from smolagents import ToolCollection, CodeAgent
|
||||||
|
|
||||||
image_tool_collection = ToolCollection(
|
image_tool_collection = ToolCollection(
|
||||||
collection_slug="huggingface-tools/diffusion-tools-6630bb19a942c2306a2cdb6f",
|
collection_slug="huggingface-tools/diffusion-tools-6630bb19a942c2306a2cdb6f",
|
||||||
|
|
Loading…
Reference in New Issue