@voiceflow/voiceflow-types
Version:
Voiceflow 'voiceflow' project types
74 lines (73 loc) • 5.01 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GENERAL_SLOT_TYPE_TO_LUIS = exports.BuiltInLuisSlotType = void 0;
const constants_1 = require("../constants");
/**
* @deprecated
* LUIS NLU will be retired at October 1st 2025. Avoid using this mapping on core NLU training logic on
* Voiceflow. Please use `BuiltInVfnluSlotType` instead.
*/
var BuiltInLuisSlotType;
(function (BuiltInLuisSlotType) {
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-age */
BuiltInLuisSlotType["AGE"] = "age";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-currency */
BuiltInLuisSlotType["CURRENCY"] = "money";
/** @deprecated @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-deprecated */
BuiltInLuisSlotType["DATETIME"] = "datetime";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-datetimev2 */
BuiltInLuisSlotType["DATETIME_V2"] = "datetimeV2";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-dimension */
BuiltInLuisSlotType["DIMENSION"] = "dimension";
/** @deprecated @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-deprecated#encyclopedia-culture */
BuiltInLuisSlotType["ENCYCLOPEDIA"] = "encyclopedia";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-email */
BuiltInLuisSlotType["EMAIL"] = "email";
/** @deprecated @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-deprecated#geography-culture */
BuiltInLuisSlotType["GEOGRAPHY"] = "geography";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-geographyv2 */
BuiltInLuisSlotType["GEOGRAPHY_V2"] = "geographyV2";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-keyphrase */
BuiltInLuisSlotType["KEY_PHRASE"] = "keyPhrase";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-number */
BuiltInLuisSlotType["NUMBER"] = "number";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-ordinal */
BuiltInLuisSlotType["ORDINAL"] = "ordinal";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-ordinal-v2 */
BuiltInLuisSlotType["ORDINAL_V2"] = "ordinalV2";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-percentage */
BuiltInLuisSlotType["PERCENTAGE"] = "percentage";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-person */
BuiltInLuisSlotType["PERSON_NAME"] = "personName";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-phonenumber */
BuiltInLuisSlotType["PHONENUMBER"] = "phonenumber";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-temperature */
BuiltInLuisSlotType["TEMPERATURE"] = "temperature";
/** @see https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-reference-prebuilt-url */
BuiltInLuisSlotType["URL"] = "url";
})(BuiltInLuisSlotType || (exports.BuiltInLuisSlotType = BuiltInLuisSlotType = {}));
/**
* @deprecated
* LUIS NLU will be retired at October 1st 2025. Avoid using this mapping on core NLU training logic on
* Voiceflow. Please use `GENERAL_SLOT_TYPE_TO_VFNLU` instead.
*/
exports.GENERAL_SLOT_TYPE_TO_LUIS = new Map([
[constants_1.SlotType.AGE, BuiltInLuisSlotType.AGE],
[constants_1.SlotType.CURRENCY, BuiltInLuisSlotType.CURRENCY],
[constants_1.SlotType.DATETIME, BuiltInLuisSlotType.DATETIME_V2],
[constants_1.SlotType.DIMENSION, BuiltInLuisSlotType.DIMENSION],
[constants_1.SlotType.EMAIL, BuiltInLuisSlotType.EMAIL],
[constants_1.SlotType.GEOGRAPHY, BuiltInLuisSlotType.GEOGRAPHY_V2],
[constants_1.SlotType.KEY_PHRASE, BuiltInLuisSlotType.KEY_PHRASE],
[constants_1.SlotType.NAME, BuiltInLuisSlotType.PERSON_NAME],
[constants_1.SlotType.NUMBER, BuiltInLuisSlotType.NUMBER],
[constants_1.SlotType.ORDINAL, BuiltInLuisSlotType.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, BuiltInLuisSlotType.PERCENTAGE],
[constants_1.SlotType.PHONENUMBER, BuiltInLuisSlotType.PHONENUMBER],
[constants_1.SlotType.TEMPERATURE, BuiltInLuisSlotType.TEMPERATURE],
[constants_1.SlotType.URL, BuiltInLuisSlotType.URL],
]);