Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ef3e25ce
Unverified
Commit
ef3e25ce
authored
May 12, 2023
by
Steven Liu
Committed by
GitHub
May 12, 2023
Browse files
[docs] Fix Agents and Tools docstring (#23313)
fix kwargs
parent
a3975f94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/transformers/tools/agents.py
src/transformers/tools/agents.py
+2
-2
src/transformers/tools/base.py
src/transformers/tools/base.py
+3
-3
No files found.
src/transformers/tools/agents.py
View file @
ef3e25ce
...
...
@@ -248,7 +248,7 @@ class Agent:
Whether to just return code and not evaluate it.
remote (`bool`, *optional*, defaults to `False`):
Whether or not to use remote tools (inference endpoints) instead of local ones.
kwargs:
kwargs
(additional keyword arguments, *optional*)
:
Any keyword argument to send to the agent when evaluating the code.
Example:
...
...
@@ -298,7 +298,7 @@ class Agent:
Whether to just return code and not evaluate it.
remote (`bool`, *optional*, defaults to `False`):
Whether or not to use remote tools (inference endpoints) instead of local ones.
kwargs:
kwargs
(additional keyword arguments, *optional*)
:
Any keyword argument to send to the agent when evaluating the code.
Example:
...
...
src/transformers/tools/base.py
View file @
ef3e25ce
...
...
@@ -188,7 +188,7 @@ class Tool:
`huggingface-cli login` (stored in `~/.huggingface`).
remote (`bool`, *optional*, defaults to `False`):
Whether to use your tool by downloading the model or (if it is available) with an inference endpoint.
kwargs:
kwargs
(additional keyword arguments, *optional*)
:
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
`cache_dir`, `revision`, `subfolder`) will be used when downloading the files for your tool, and the
others will be passed along to its init.
...
...
@@ -438,7 +438,7 @@ class PipelineTool(Tool):
token (`str`, *optional*):
The token to use as HTTP bearer authorization for remote files. If unset, will use the token generated when
running `huggingface-cli login` (stored in `~/.huggingface`).
hub_kwargs:
hub_kwargs
(additional keyword arguments, *optional*)
:
Any additional keyword argument to send to the methods that will load the data from the Hub.
"""
...
...
@@ -631,7 +631,7 @@ def load_tool(task_or_repo_id, model_repo_id=None, remote=False, token=None, **k
token (`str`, *optional*):
The token to identify you on hf.co. If unset, will use the token generated when running `huggingface-cli
login` (stored in `~/.huggingface`).
kwargs:
kwargs
(additional keyword arguments, *optional*)
:
Additional keyword arguments that will be split in two: all arguments relevant to the Hub (such as
`cache_dir`, `revision`, `subfolder`) will be used when downloading the files for your tool, and the others
will be passed along to its init.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment