/** * @module botbuilder-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { ArrayExpression, BoolExpression, Expression, StringExpression } from 'adaptive-expressions'; import { Activity, RecognizerResult } from 'botbuilder-core'; import { Converter, ConverterFactory, DialogContext, Recognizer, RecognizerConfiguration } from 'botbuilder-dialogs'; import { ListElement } from './listElement'; import { LuisAdaptivePredictionOptions, LuisAdaptivePredictionOptionsConfiguration } from './luisAdaptivePredictionOptions'; import { LuisRecognizerOptionsV3 } from './luisRecognizer'; /** * Defines an extension for a list entity. */ declare type DynamicList = { /** * The name of the list to extend. */ entity: string; /** * The lists to append on the extended list entity. */ list: ListElement[]; }; export interface LuisAdaptiveRecognizerConfiguration extends RecognizerConfiguration { applicationId?: string | Expression | StringExpression; version?: string | Expression | StringExpression; endpoint?: string | Expression | StringExpression; endpointKey?: string | Expression | StringExpression; externalEntityRecognizer?: string | Recognizer; dynamicLists?: unknown[] | string | Expression | ArrayExpression; predictionOptions?: LuisAdaptivePredictionOptionsConfiguration | LuisAdaptivePredictionOptions; logPersonalInformation?: boolean | string | Expression | BoolExpression; } /** * Class that represents an adaptive LUIS recognizer. */ export declare class LuisAdaptiveRecognizer extends Recognizer implements LuisAdaptiveRecognizerConfiguration { static $kind: string; /** * LUIS application ID. */ applicationId: StringExpression; /** * LUIS application version. */ version: StringExpression; /** * LUIS endpoint to query. * * @summary * For example: "https://westus.api.cognitive.microsoft.com" */ endpoint: StringExpression; /** * Key used to talk to a LUIS endpoint. */ endpointKey: StringExpression; /** * External entity recognizer. * * @summary * This recognizer is run before calling LUIS and the results are passed to LUIS. */ externalEntityRecognizer: Recognizer; /** * LUIS dynamic list. */ dynamicLists: ArrayExpression; /** * LUIS prediction options. */ predictionOptions: LuisAdaptivePredictionOptions; /** * The flag to indicate in personal information should be logged in telemetry. */ logPersonalInformation: BoolExpression; /** * @param property Properties that extend RecognizerConfiguration. * @returns Expression converter. */ getConverter(property: keyof LuisAdaptiveRecognizerConfiguration): Converter | ConverterFactory; /** * To recognize intents and entities in a users utterance. * * @param {DialogContext} dialogContext The [DialogContext](xref:botbuilder-dialogs.DialogContext). * @param {Activity} activity The [Activity](xref:botbuilder-core.Activity). * @param {object} telemetryProperties Optional. Additional properties to be logged to telemetry with event. * @param {object} telemetryMetrics Optional. Additional metrics to be logged to telemetry with event. * @returns {Promise} A promise resolving to the recognizer result. */ recognize(dialogContext: DialogContext, activity: Activity, telemetryProperties?: Record, telemetryMetrics?: Record): Promise; /** * Construct V3 recognizer options from the current dialog context. * * @param {DialogContext} dialogContext Current dialog context. * @returns {LuisRecognizerOptionsV3} luis recognizer options */ recognizerOptions(dialogContext: DialogContext): LuisRecognizerOptionsV3; /** * Fills the event properties for LuisResult event for telemetry. * These properties are logged when the recognizer is called. * * @param {RecognizerResult} recognizerResult Last activity sent from user. * @param {object} telemetryProperties Additional properties to be logged to telemetry with the LuisResult event. * @param {DialogContext} dialogContext Dialog context. * @returns {object} A dictionary that is sent as properties to BotTelemetryClient.trackEvent method for the LuisResult event. */ protected fillRecognizerResultTelemetryProperties(recognizerResult: RecognizerResult, telemetryProperties: { [key: string]: string; }, dialogContext: DialogContext): { [key: string]: string; }; } export {}; //# sourceMappingURL=luisAdaptiveRecognizer.d.ts.map