UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

31 lines 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MakeCommentTool = void 0; const Logger_1 = require("../utils/Logger"); const Tool_1 = require("./Tool"); /** * Tool for making a comment during course of the flow. */ class MakeCommentTool extends Tool_1.Tool { constructor() { super(MakeCommentTool.NAME, 'Make a comment regarding the current page or Donobu flow.', 'MakeCommentToolCoreParameters', 'MakeCommentToolGptParameters'); } async call(_context, _parameters) { Logger_1.appLogger.warn(`${this.name} tool is being run without a GPT even though it makes no sense to do so!`); return { isSuccessful: true, forLlm: '', metadata: null, }; } async callFromGpt(_context, parameters) { return { isSuccessful: true, forLlm: parameters.comment, metadata: null, }; } } exports.MakeCommentTool = MakeCommentTool; MakeCommentTool.NAME = 'makeComment'; //# sourceMappingURL=MakeCommentTool.js.map