UNPKG

donobu

Version:

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

35 lines 1.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetEntityDataFromGoogleMapResultTool = void 0; const Tool_1 = require("./Tool"); const Logger_1 = require("../utils/Logger"); /** * This tool is meant to be called when looking at a Google Maps search result for a * business/entity. This is only used for mapping the API inputs for the special flows API * extractGoogleStreetviewEntityData so that the underlying special flow can be run. */ class GetEntityDataFromGoogleMapResultTool extends Tool_1.Tool { constructor() { super(GetEntityDataFromGoogleMapResultTool.NAME, 'Gets the business/entity data found at the current Google Maps location.', 'GetEntityDataFromGoogleMapResultToolCoreParameters', 'GetEntityDataFromGoogleMapResultToolGptParameters'); } async call(context, _parameters) { Logger_1.appLogger.error(`${this.name} tool is being run without a GPT even though it makes no sense to do so!`); context.metadata.nextState = 'FAILED'; return { isSuccessful: false, forLlm: '', metadata: null, }; } async callFromGpt(context, parameters) { context.metadata.nextState = 'SUCCESS'; return { isSuccessful: true, forLlm: 'Successfully extracted the business/entity data from the current Google Maps location.', metadata: { ...parameters }, }; } } exports.GetEntityDataFromGoogleMapResultTool = GetEntityDataFromGoogleMapResultTool; GetEntityDataFromGoogleMapResultTool.NAME = 'getEntityDataFromGoogleMapResult'; //# sourceMappingURL=GetEntityDataFromGoogleMapResult.js.map