UNPKG

@voiceflow/voiceflow-types

Version:

Voiceflow 'voiceflow' project types

80 lines (79 loc) 5.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GENERAL_SLOT_TYPE_TO_VFNLU = exports.BuiltInVFNLUSlotType = void 0; const constants_1 = require("../constants"); /** * @deprecated * Consider replacing these slot types, which were originally defined for LUIS NLU, into a new set of * default slot types for VFNLU. The VFNLU should not be constrained by the limitations of LUIS. We can * add new slot types that were never supported by LUIS or remove LUIS defaults that we don't want to * support. * * Speak with the NLUM/ML team for how they want to approach this. */ var BuiltInVFNLUSlotType; (function (BuiltInVFNLUSlotType) { /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-age */ BuiltInVFNLUSlotType["AGE"] = "age"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-currency */ BuiltInVFNLUSlotType["CURRENCY"] = "money"; /** @deprecated @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-deprecated */ BuiltInVFNLUSlotType["DATETIME"] = "datetime"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-datetimev2 */ BuiltInVFNLUSlotType["DATETIME_V2"] = "datetimeV2"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-dimension */ BuiltInVFNLUSlotType["DIMENSION"] = "dimension"; /** @deprecated @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-deprecated#encyclopedia-culture */ BuiltInVFNLUSlotType["ENCYCLOPEDIA"] = "encyclopedia"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-email */ BuiltInVFNLUSlotType["EMAIL"] = "email"; /** @deprecated @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-deprecated#geography-culture */ BuiltInVFNLUSlotType["GEOGRAPHY"] = "geography"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-geographyv2 */ BuiltInVFNLUSlotType["GEOGRAPHY_V2"] = "geographyV2"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-keyphrase */ BuiltInVFNLUSlotType["KEY_PHRASE"] = "keyPhrase"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-number */ BuiltInVFNLUSlotType["NUMBER"] = "number"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-ordinal */ BuiltInVFNLUSlotType["ORDINAL"] = "ordinal"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-ordinal-v2 */ BuiltInVFNLUSlotType["ORDINAL_V2"] = "ordinalV2"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-percentage */ BuiltInVFNLUSlotType["PERCENTAGE"] = "percentage"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-person */ BuiltInVFNLUSlotType["PERSON_NAME"] = "personName"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-phonenumber */ BuiltInVFNLUSlotType["PHONENUMBER"] = "phonenumber"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-temperature */ BuiltInVFNLUSlotType["TEMPERATURE"] = "temperature"; /** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-url */ BuiltInVFNLUSlotType["URL"] = "url"; })(BuiltInVFNLUSlotType || (exports.BuiltInVFNLUSlotType = BuiltInVFNLUSlotType = {})); /** * @deprecated * This mapping is a temporary data structure that is to map our general slot types into a format * compatible with LUIS. This mapping is unnecessary with the introducion of VFNLU and we should * eventually refactor the NLU so that `SlotType` can be used directly. In the meantime, this mapping * is left in for backwards compatibility. */ exports.GENERAL_SLOT_TYPE_TO_VFNLU = new Map([ [constants_1.SlotType.AGE, BuiltInVFNLUSlotType.AGE], [constants_1.SlotType.CURRENCY, BuiltInVFNLUSlotType.CURRENCY], [constants_1.SlotType.DATETIME, BuiltInVFNLUSlotType.DATETIME_V2], [constants_1.SlotType.DIMENSION, BuiltInVFNLUSlotType.DIMENSION], [constants_1.SlotType.EMAIL, BuiltInVFNLUSlotType.EMAIL], [constants_1.SlotType.GEOGRAPHY, BuiltInVFNLUSlotType.GEOGRAPHY_V2], [constants_1.SlotType.KEY_PHRASE, BuiltInVFNLUSlotType.KEY_PHRASE], [constants_1.SlotType.NAME, BuiltInVFNLUSlotType.PERSON_NAME], [constants_1.SlotType.NUMBER, BuiltInVFNLUSlotType.NUMBER], [constants_1.SlotType.ORDINAL, BuiltInVFNLUSlotType.ORDINAL], // ORDINAL_V2 doesn't exist in VoiceflowConstants.SlotType currently, // might get modified in the future once ORDINAL_V2 gets better language support on LUIS // eslint-disable-next-line no-secrets/no-secrets // [VoiceflowConstants.SlotType.ORDINAL_V2, BuiltInLuisSlotType.ORDINAL_V2], [constants_1.SlotType.PERCENTAGE, BuiltInVFNLUSlotType.PERCENTAGE], [constants_1.SlotType.PHONENUMBER, BuiltInVFNLUSlotType.PHONENUMBER], [constants_1.SlotType.TEMPERATURE, BuiltInVFNLUSlotType.TEMPERATURE], [constants_1.SlotType.URL, BuiltInVFNLUSlotType.URL], ]);