Skip to content

Commit 4857997

Browse files
authored
[tool] fix: Typo fix -- Rename to_openai_function_tool_schema to get_openai_tool_schema (verl-project#2806)
### What does this PR do? Fixes a typo in the docstring of some tools. `to_openai_function_tool_schema()` does not exist. ### Checklist Before Starting - [x] Search for similar PRs. Paste at least one query link here: https://github.com/volcengine/verl/pulls?q=is%3Apr+is%3Aopen+to_openai_function_tool_schema - [x] Format the PR title as `[{modules}] {type}: {description}` (This will be checked by the CI) - `{modules}` include `fsdp`, `megatron`, `sglang`, `vllm`, `rollout`, `trainer`, `ci`, `training_utils`, `recipe`, `hardware`, `deployment`, `ray`, `worker`, `single_controller`, `misc`, `perf`, `model`, `algo`, `env`, `tool`, `ckpt`, `doc`, `data` - If this PR involves multiple modules, separate them with `,` like `[megatron, fsdp, doc]` - `{type}` is in `feat`, `fix`, `refactor`, `chore`, `test` - If this PR breaks any API (CLI arguments, config, function signature, etc.), add `[BREAKING]` to the beginning of the title. - Example: `[BREAKING][fsdp, megatron] feat: dynamic batching` ### Test N/A ### API and Usage Example N/A ### Design & Code Changes N/A ### Checklist Before Submitting > [!IMPORTANT] > Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review. - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): `pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always` - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/volcengine/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [x] Once your PR is ready for CI, send a message in [the `ci-request` channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the `verl` Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).)
1 parent 977b7d9 commit 4857997

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

verl/tools/base_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BaseTool:
2626
2727
A tool should support the following methods:
2828
29-
- `to_openai_function_tool_schema`: return the tool schema in OpenAI format.
29+
- `get_openai_tool_schema`: return the tool schema in OpenAI format.
3030
- `create`: create a tool instance for a trajectory.
3131
- `execute`: execute the tool.
3232
- `calc_reward`: calculate the reward respect to tool state.

verl/tools/geo3k_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
class Geo3kTool(BaseTool):
3333
"""A demo tool for calculating the reward of geo3k.
34-
- `to_openai_function_tool_schema`: return the tool schema in OpenAI format.
34+
- `get_openai_tool_schema`: return the tool schema in OpenAI format.
3535
- `create`: create a tool instance for a trajectory.
3636
- `execute`: execute the tool.
3737
- `calc_reward`: calculate the reward respect to tool state.

verl/tools/gsm8k_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
class Gsm8kTool(BaseTool):
3232
"""A demo tool for calculating the reward of gsm8k.
3333
34-
- `to_openai_function_tool_schema`: return the tool schema in OpenAI format.
34+
- `get_openai_tool_schema`: return the tool schema in OpenAI format.
3535
- `create`: create a tool instance for a trajectory.
3636
- `execute`: execute the tool.
3737
- `calc_reward`: calculate the reward respect to tool state.

verl/tools/sandbox_fusion_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def init_execution_pool(
101101
class SandboxFusionTool(BaseTool):
102102
"""A tool for executing the code using sanbox fusion image.
103103
104-
- `to_openai_function_tool_schema`: return the tool schema in OpenAI format.
104+
- `get_openai_tool_schema`: return the tool schema in OpenAI format.
105105
- `create`: create a tool instance for a trajectory.
106106
- `execute`: execute the tool.
107107
- `calc_reward`: calculate the reward respect to tool state.

0 commit comments

Comments
 (0)