ai-utils.js
Version:
Build AI applications, chatbots, and agents with JavaScript and TypeScript.
44 lines (43 loc) • 1.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tool = void 0;
class Tool {
constructor(options) {
Object.defineProperty(this, "name", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "description", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "inputSchema", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "execute", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.name = options.name;
this.description = options.description;
this.inputSchema = options.inputSchema;
this.execute = options.execute;
}
get inputSchemaDefinition() {
return {
name: this.name,
description: this.description,
schema: this.inputSchema,
};
}
}
exports.Tool = Tool;