You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Required prerequisites
Motivation
Currently, the metaclass of
BaseToolkit
isAgentOpsMeta
, which seems to be used for logging function call data. However, sinceOpenAPIToolkit
does not inherit fromBaseToolkit
, it has not been decorated.Additionally, the method to check whether a function needs to be decorated with
agentops_decorator
seems to only remove theget_tools
function, which indeed does not apply to the currentOpenAPIToolkit
.Moreover, The method for loading toolkits in #1012 also first checks whether the toolkit inherits from
BaseToolkit
, henceOpenAPIToolkit
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, handleOpenAPIToolkit
specially withinToolkitManager
. However, this meansOpenAPIToolkit
cannot utilize methods fromBaseToolkit
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.
The text was updated successfully, but these errors were encountered: