UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

46 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.REGEX_SLOT_FILLER = void 0; /* Custom modules */ const createNodeDescriptor_1 = require("../../createNodeDescriptor"); /** * Node name: 'regexSlotFiller' * * Purpose: * Fills slots dynamically by evaluating a custom regular expression */ exports.REGEX_SLOT_FILLER = (0, createNodeDescriptor_1.createNodeDescriptor)({ type: "regexSlotFiller", defaultLabel: "Regex Slot Filler", summary: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__SUMMARY", appearance: { showIcon: false }, fields: [ { key: "regex", type: "cognigyText", label: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__REGEX__LABEL", description: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__REGEX__DESCRIPTION", defaultValue: ".*" }, { key: "flags", type: "cognigyText", label: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__FLAGS__LABEL", defaultValue: "gi" }, { key: "slot", type: "cognigyText", label: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__SLOT__LABEL" }, ], tags: ["ai", "nlu", "regular", "expression", "slot"], function: async (regexSlotFillerParams) => { const { cognigy, config } = regexSlotFillerParams; const { api } = cognigy; api.setRegexSlot(regexSlotFillerParams); } }); //# sourceMappingURL=regexSlotFiller.js.map