Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable getting a tool from a ToolKit by tool_name and listing the available tool_name_list #1036

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

yiyiyi0817
Copy link
Member

@yiyiyi0817 yiyiyi0817 commented Oct 10, 2024

Description

I implemented enabling getting a tool by tool_name and listing the available tool names in BaseToolkit by adding list_tools(self) -> List[str] and def get_a_tool(self, func_name: str) -> List[OpenAIFunction]: methods.

Currently, since OpenAPIToolkit does not inherit from BaseToolkit, thus it cannot use the list_tools and get_a_tool functions. This may necessitate further discussion on whether OpenAPIToolkit should inherit from BaseToolkit.

Motivation and Context

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.

@yiyiyi0817 yiyiyi0817 added enhancement New feature or request FunctionCall New Feature size:M This PR changes 30-99 lines, ignoring generated files. size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Oct 10, 2024
@yiyiyi0817 yiyiyi0817 added this to the Sprint 14 milestone Oct 10, 2024
@yiyiyi0817 yiyiyi0817 self-assigned this Oct 10, 2024
@yiyiyi0817 yiyiyi0817 mentioned this pull request Oct 12, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FunctionCall New Feature size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Reviewing
Development

Successfully merging this pull request may close these issues.

[Feature Request] Enable getting a tool from a ToolKit by tool_name and listing the available tool_name_list
1 participant