Skip to content

Build and run agents you can see, understand and trust.

docs(tool): fix docstring formatting errors (#2127)

Hanchen Qiu6d5f73db9dc1
diff --git a/src/agentscope/tool/_tool_group.py b/src/agentscope/tool/_tool_group.py
index 87857b0f2..3f58f2ff3 100644
--- a/src/agentscope/tool/_tool_group.py
+++ b/src/agentscope/tool/_tool_group.py
@@ -51,7 +51,7 @@ class ToolGroup:
"""Initialize the tool group.
Args:
- name (`Literal["basic"] | str):
+ name (`Literal["basic"] | str`):
The name of the tool group.
description (`str | None`):
The description of the tool group.
diff --git a/src/agentscope/tool/_toolkit.py b/src/agentscope/tool/_toolkit.py
index 196415261..06133b8b4 100644
--- a/src/agentscope/tool/_toolkit.py
+++ b/src/agentscope/tool/_toolkit.py
@@ -178,8 +178,8 @@ class Toolkit:
.. note:: The preset keyword arguments is removed from the JSON
schema, and the extended model is applied if it is set.
- Args:
- groups (`list[str] | None`, optional):
+ Args:
+ groups (`list[str] | None`, optional):
A list of group names to filter the tool function. The "basic"
group will always be included regardless of the filter. If not
provided, only the "basic" group will be included.
@@ -401,7 +401,7 @@ class Toolkit:
provided, only the "basic" group will be included.
Returns:
- `dict[str, Skill]`
+ `dict[str, Skill]`:
A dictionary of skill name and their corresponding Skill
objects.
"""
diff --git a/src/agentscope/tool/_utils.py b/src/agentscope/tool/_utils.py
index 5d6a410f8..20c6ad001 100644
--- a/src/agentscope/tool/_utils.py
+++ b/src/agentscope/tool/_utils.py
@@ -73,7 +73,7 @@ def _extract_input_schema(
"""Extract input schema from the tool function's docstring
Args:
- tool_func (`ToolFunction`):
+ tool_func (`Callable`):
The tool function to extract the JSON schema from.
include_var_positional (`bool`):
Whether to include variable positional arguments in the JSON