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
The documentation for "Create a Custom Tool" (https://docs.kaibanjs.com/tools-docs/custom-tools/Create%20a%20Custom%20Tool) contains outdated instructions for setting up name, description, and schema properties in a custom tool class. It suggests assigning these properties directly within the class using this.property, as shown below:
this.name="custom_tool";this.description="Describe what your tool does.";this.schema=z.object({ ... });
However, the current implementation of the LangChain Tool class, on which KaibanJS depends, expects these properties to be passed as parameters to the super() constructor call, as shown in the example below:
super({name: "Text-to-Speech",description: "Convert text to speech using OpenAI TTS",schema: z.object({ ... }),});
This discrepancy may cause confusion for users following the documentation and trying to implement custom tools.
Thank you for catching this discrepancy! We’ll update the "Create a Custom Tool" documentation to reflect the correct approach of initializing properties via the super() constructor call.
Describe the Issue
The documentation for "Create a Custom Tool" (https://docs.kaibanjs.com/tools-docs/custom-tools/Create%20a%20Custom%20Tool) contains outdated instructions for setting up
name
,description
, andschema
properties in a custom tool class. It suggests assigning these properties directly within the class usingthis.property
, as shown below:However, the current implementation of the LangChain
Tool
class, on which KaibanJS depends, expects these properties to be passed as parameters to thesuper()
constructor call, as shown in the example below:This discrepancy may cause confusion for users following the documentation and trying to implement custom tools.
Doc URL
https://docs.kaibanjs.com/tools-docs/custom-tools/Create%20a%20Custom%20Tool
The text was updated successfully, but these errors were encountered: