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

[Feature Request] integrate the OpenAPIToolkit into the ToolkitManager #1127

Open
1 of 2 tasks
yiyiyi0817 opened this issue Oct 27, 2024 · 0 comments
Open
1 of 2 tasks
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@yiyiyi0817
Copy link
Member

yiyiyi0817 commented Oct 27, 2024

Required prerequisites

Motivation

Currently, the metaclass of BaseToolkit is AgentOpsMeta, which seems to be used for logging function call data. However, since OpenAPIToolkit does not inherit from BaseToolkit, it has not been decorated.

Additionally, the method to check whether a function needs to be decorated with agentops_decorator seems to only remove the get_tools function, which indeed does not apply to the current OpenAPIToolkit.

Moreover, The method for loading toolkits in #1012 also first checks whether the toolkit inherits from BaseToolkit, hence OpenAPIToolkit is not being loaded either.

Perhaps these two issues should be considered together.

Solution

First solution:
Refactor OpenAPIToolkit to inherit from BaseToolkit. In this case, AgentOpsMeta might need to be modified to handle OpenAPIToolkit specially.

Second solution:
OpenAPIToolkit does not inherit from BaseToolkit. Instead, handle OpenAPIToolkit specially within ToolkitManager. However, this means OpenAPIToolkit cannot utilize methods from BaseToolkit as seen in #1036.

Alternatives

No response

Additional context

Further discussions with contributors involved with tools refactor may be necessary. Alternatively, consider submitting another PR for improvements after the merge of #1012.

@yiyiyi0817 yiyiyi0817 added the enhancement New feature or request label Oct 27, 2024
@yiyiyi0817 yiyiyi0817 self-assigned this Oct 27, 2024
@yiyiyi0817 yiyiyi0817 moved this to Backlog in Project Camel Oct 27, 2024
@Wendong-Fan Wendong-Fan added this to the Sprint 16 milestone Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants