Thread dialogcontext/activity through LuisRecognizer so it can be passed to ExternalEntityRecognizer (#4811)
* Recognizers in Adaptive use DialogContext and Activity (to allow reevaluation of activities after amiguity resolution.) To adapt to that LuisAdaptiveRecognizer would create a temp turncontext to have the activity in it. The right way to do this is to actually thread the DialogContext/activity through to the luisrecognizer class... For ExternalEntityRecognizer to work it needs the dc/activity to pass to the external recognizer, so it was time to replace the legacy code with code that threads the dc/activity down to the luis recognizer. Unit tests for adaptive already go through this path, so no new unit tests are required. * change to activity?.text as per rest of code. * add tests.sschema back in * generated by running all tests local * change batch file to trigger new build
This commit is contained in:
Родитель
3f2fe39940
Коммит
9ed1ab39c5
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<LocalPackageVersion>4.10.0-local</LocalPackageVersion>
|
||||
<LocalPackageVersion>4.11.0-local</LocalPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -111,14 +111,9 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
/// <inheritdoc/>
|
||||
public override async Task<RecognizerResult> RecognizeAsync(DialogContext dialogContext, Activity activity, CancellationToken cancellationToken = default, Dictionary<string, string> telemetryProperties = null, Dictionary<string, double> telemetryMetrics = null)
|
||||
{
|
||||
var wrapper = new LuisRecognizer(RecognizerOptions(dialogContext), HttpClient);
|
||||
var recognizer = new LuisRecognizer(RecognizerOptions(dialogContext), HttpClient);
|
||||
|
||||
// temp clone of turn context because luisrecognizer always pulls activity from turn context.
|
||||
RecognizerResult result;
|
||||
using (var tempContext = new TurnContext(dialogContext.Context, activity))
|
||||
{
|
||||
result = await wrapper.RecognizeAsync(tempContext, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
RecognizerResult result = await recognizer.RecognizeAsync(dialogContext, activity, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
TrackRecognizerResult(dialogContext, "LuisResult", FillRecognizerResultTelemetryProperties(result, telemetryProperties, dialogContext), telemetryMetrics);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
var currentHandler = CreateHttpHandlerPipeline(httpClientHandler, delegatingHandler);
|
||||
#pragma warning restore CA2000 // Dispose objects before losing scope
|
||||
|
||||
HttpClient = new HttpClient(currentHandler, false)
|
||||
HttpClient = new HttpClient(currentHandler, false)
|
||||
{
|
||||
Timeout = TimeSpan.FromMilliseconds(recognizerOptions.Timeout),
|
||||
};
|
||||
|
@ -195,6 +195,16 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
public virtual async Task<RecognizerResult> RecognizeAsync(ITurnContext turnContext, CancellationToken cancellationToken)
|
||||
=> await RecognizeInternalAsync(turnContext, null, null, null, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a generic recognizer result.
|
||||
/// </summary>
|
||||
/// <param name="dialogContext">dialogcontext.</param>
|
||||
/// <param name="activity">activity.</param>
|
||||
/// <param name="cancellationToken">cancellationtoken.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> representing the result of the asynchronous operation.</returns>
|
||||
public virtual async Task<RecognizerResult> RecognizeAsync(DialogContext dialogContext, Activity activity, CancellationToken cancellationToken)
|
||||
=> await RecognizeInternalAsync(dialogContext, activity, null, null, null, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a generic recognizer result.
|
||||
/// </summary>
|
||||
|
@ -219,6 +229,22 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">type of result.</typeparam>
|
||||
/// <param name="dialogContext">dialogContext.</param>
|
||||
/// <param name="activity">activity.</param>
|
||||
/// <param name="cancellationToken">cancellationToken.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> representing the result of the asynchronous operation.</returns>
|
||||
public virtual async Task<T> RecognizeAsync<T>(DialogContext dialogContext, Activity activity, CancellationToken cancellationToken)
|
||||
where T : IRecognizerConvert, new()
|
||||
{
|
||||
var result = new T();
|
||||
result.Convert(await RecognizeInternalAsync(dialogContext, activity, null, null, null, cancellationToken).ConfigureAwait(false));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
|
||||
/// </summary>
|
||||
|
@ -249,6 +275,18 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
public virtual async Task<RecognizerResult> RecognizeAsync(ITurnContext turnContext, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken))
|
||||
=> await RecognizeInternalAsync(turnContext, null, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
/// <param name="dialogContext">Context object containing information for a single turn of conversation with a user.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="telemetryProperties">Additional properties to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="telemetryMetrics">Additional metrics to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
/// <returns>The LUIS results of the analysis of the current message text in the current turn's context activity.</returns>
|
||||
public virtual async Task<RecognizerResult> RecognizeAsync(DialogContext dialogContext, Activity activity, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken))
|
||||
=> await RecognizeInternalAsync(dialogContext, activity, null, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
|
@ -283,6 +321,24 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The recognition result type.</typeparam>
|
||||
/// <param name="dialogContext">Context object containing information for a single turn of conversation with a user.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="telemetryProperties">Additional properties to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="telemetryMetrics">Additional metrics to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
/// <returns>The LUIS results of the analysis of the current message text in the current turn's context activity.</returns>
|
||||
public virtual async Task<T> RecognizeAsync<T>(DialogContext dialogContext, Activity activity, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken))
|
||||
where T : IRecognizerConvert, new()
|
||||
{
|
||||
var result = new T();
|
||||
result.Convert(await RecognizeInternalAsync(dialogContext, activity, null, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
|
@ -317,6 +373,20 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return await RecognizeInternalAsync(turnContext, recognizerOptions, null, null, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a generic recognizer result.
|
||||
/// </summary>
|
||||
/// <param name="dialogContext">dialog context.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="recognizerOptions">A <see cref="LuisRecognizerOptions"/> instance to be used by the call.
|
||||
/// This parameter overrides the default <see cref="LuisRecognizerOptions"/> passed in the constructor.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Analysis of utterance.</returns>
|
||||
public virtual async Task<RecognizerResult> RecognizeAsync(DialogContext dialogContext, Activity activity, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken)
|
||||
{
|
||||
return await RecognizeInternalAsync(dialogContext, activity, recognizerOptions, null, null, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
|
||||
/// </summary>
|
||||
|
@ -334,6 +404,24 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The recognition result type.</typeparam>
|
||||
/// <param name="dialogContext">dialog context.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="recognizerOptions">A <see cref="LuisRecognizerOptions"/> instance to be used by the call.
|
||||
/// This parameter overrides the default <see cref="LuisRecognizerOptions"/> passed in the constructor.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Analysis of utterance.</returns>
|
||||
public virtual async Task<T> RecognizeAsync<T>(DialogContext dialogContext, Activity activity, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken)
|
||||
where T : IRecognizerConvert, new()
|
||||
{
|
||||
var result = new T();
|
||||
result.Convert(await RecognizeInternalAsync(dialogContext, activity, recognizerOptions, null, null, cancellationToken).ConfigureAwait(false));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
|
@ -349,6 +437,22 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return await RecognizeInternalAsync(turnContext, recognizerOptions, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
/// <param name="dialogContext">Context object containing information for a single turn of conversation with a user.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="recognizerOptions">A <see cref="LuisRecognizerOptions"/> instance to be used by the call.
|
||||
/// This parameter overrides the default <see cref="LuisRecognizerOptions"/> passed in the constructor.</param>
|
||||
/// <param name="telemetryProperties">Additional properties to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="telemetryMetrics">Additional metrics to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
/// <returns>The LUIS results of the analysis of the current message text in the current turn's context activity.</returns>
|
||||
public virtual async Task<RecognizerResult> RecognizeAsync(DialogContext dialogContext, Activity activity, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
return await RecognizeInternalAsync(dialogContext, activity, recognizerOptions, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
|
@ -368,6 +472,26 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return results of the analysis (Suggested actions and intents).
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The recognition result type.</typeparam>
|
||||
/// <param name="dialogContext">Context object containing information for a single turn of conversation with a user.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="recognizerOptions">A <see cref="LuisRecognizerOptions"/> instance to be used by the call.
|
||||
/// This parameter overrides the default <see cref="LuisRecognizerOptions"/> passed in the constructor.</param>
|
||||
/// <param name="telemetryProperties">Additional properties to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="telemetryMetrics">Additional metrics to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
/// <returns>The LUIS results of the analysis of the current message text in the current turn's context activity.</returns>
|
||||
public virtual async Task<T> RecognizeAsync<T>(DialogContext dialogContext, Activity activity, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken))
|
||||
where T : IRecognizerConvert, new()
|
||||
{
|
||||
var result = new T();
|
||||
result.Convert(await RecognizeInternalAsync(dialogContext, activity, recognizerOptions, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked prior to a LuisResult being logged.
|
||||
/// </summary>
|
||||
|
@ -495,6 +619,24 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a RecognizerResult object.
|
||||
/// </summary>
|
||||
/// <param name="dialogContext">Dialog turn Context.</param>
|
||||
/// <param name="activity">activity to recognize.</param>
|
||||
/// <param name="predictionOptions">LuisRecognizerOptions implementation to override current properties.</param>
|
||||
/// <param name="telemetryProperties"> Additional properties to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="telemetryMetrics">Additional metrics to be logged to telemetry with the LuisResult event.</param>
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
/// <returns>RecognizerResult object.</returns>
|
||||
private async Task<RecognizerResult> RecognizeInternalAsync(DialogContext dialogContext, Activity activity, LuisRecognizerOptions predictionOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics, CancellationToken cancellationToken)
|
||||
{
|
||||
var recognizer = predictionOptions ?? _luisRecognizerOptions;
|
||||
var result = await recognizer.RecognizeInternalAsync(dialogContext, activity, HttpClient, cancellationToken).ConfigureAwait(false);
|
||||
await OnRecognizerResultAsync(result, dialogContext.Context, telemetryProperties, telemetryMetrics, cancellationToken).ConfigureAwait(false);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a LuisRecognizerOptionsV2.
|
||||
/// This exists to maintain backwards compatibility with existing constructors.
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Net.Http;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Bot.Builder.Dialogs;
|
||||
using Microsoft.Bot.Schema;
|
||||
|
||||
namespace Microsoft.Bot.Builder.AI.Luis
|
||||
{
|
||||
|
@ -63,6 +64,6 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
internal abstract Task<RecognizerResult> RecognizeInternalAsync(ITurnContext turnContext, HttpClient httpClient, CancellationToken cancellationToken);
|
||||
|
||||
// Support DialogContext
|
||||
internal abstract Task<RecognizerResult> RecognizeInternalAsync(DialogContext context, HttpClient httpClient, CancellationToken cancellationToken);
|
||||
internal abstract Task<RecognizerResult> RecognizeInternalAsync(DialogContext context, Activity activity, HttpClient httpClient, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
/// </summary>
|
||||
/// <param name="application">The LUIS application to use to recognize text.</param>
|
||||
public LuisRecognizerOptionsV2(LuisApplication application)
|
||||
: base(application)
|
||||
: base(application)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
/// <value> This settings will be used to call Luis.</value>
|
||||
public LuisPredictionOptions PredictionOptions { get; set; } = new LuisPredictionOptions();
|
||||
|
||||
internal override async Task<RecognizerResult> RecognizeInternalAsync(DialogContext context, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
internal override async Task<RecognizerResult> RecognizeInternalAsync(DialogContext context, Activity actiivty, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
=> await RecognizeInternalAsync(context.Context, httpClient, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
internal override async Task<RecognizerResult> RecognizeInternalAsync(ITurnContext turnContext, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
|
|
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
|||
using System.Web;
|
||||
using Microsoft.Bot.Builder.Dialogs;
|
||||
using Microsoft.Bot.Builder.TraceExtensions;
|
||||
using Microsoft.Bot.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
@ -52,14 +53,14 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
/// <value> This settings will be used to call Luis.</value>
|
||||
public LuisV3.LuisPredictionOptions PredictionOptions { get; set; } = new LuisV3.LuisPredictionOptions();
|
||||
|
||||
internal override async Task<RecognizerResult> RecognizeInternalAsync(DialogContext dialogContext, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
internal override async Task<RecognizerResult> RecognizeInternalAsync(DialogContext dialogContext, Activity activity, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
{
|
||||
var utterance = dialogContext.Context.Activity?.AsMessageActivity()?.Text;
|
||||
var options = PredictionOptions;
|
||||
if (ExternalEntityRecognizer != null)
|
||||
{
|
||||
var matches = await ExternalEntityRecognizer.RecognizeAsync(dialogContext, dialogContext.Context.Activity, cancellationToken).ConfigureAwait(false);
|
||||
if (matches.Entities != null && matches.Entities.Count > 2)
|
||||
// call external entity recognizer
|
||||
var matches = await ExternalEntityRecognizer.RecognizeAsync(dialogContext, activity, cancellationToken).ConfigureAwait(false);
|
||||
if (matches.Entities != null && matches.Entities.Count > 0)
|
||||
{
|
||||
options = new LuisV3.LuisPredictionOptions(options);
|
||||
options.ExternalEntities = new List<LuisV3.ExternalEntity>();
|
||||
|
@ -96,14 +97,15 @@ namespace Microsoft.Bot.Builder.AI.Luis
|
|||
}
|
||||
}
|
||||
|
||||
return await RecognizeAsync(dialogContext.Context, utterance, options, httpClient, cancellationToken).ConfigureAwait(false);
|
||||
// call luis recognizer with options.ExternalEntities populated from externalEntityRecognizer.
|
||||
return await RecognizeAsync(dialogContext.Context, activity?.Text, options, httpClient, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
internal override async Task<RecognizerResult> RecognizeInternalAsync(ITurnContext turnContext, HttpClient httpClient, CancellationToken cancellationToken)
|
||||
{
|
||||
return await RecognizeAsync(turnContext, turnContext?.Activity?.AsMessageActivity()?.Text, PredictionOptions, httpClient, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
||||
private static JObject BuildRequestBody(string utterance, LuisV3.LuisPredictionOptions options)
|
||||
{
|
||||
var content = new JObject
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -23,6 +23,20 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.AttachmentInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for a file or an attachment",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Attachment Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.BeginDialog": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
|
||||
|
@ -70,12 +84,54 @@
|
|||
"subtitle": "Cancel All Dialogs"
|
||||
}
|
||||
},
|
||||
"Microsoft.ChoiceInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt with multi-choice",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Choice Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.ConfirmInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for confirmation",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Confirm Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.ContinueLoop": {
|
||||
"form": {
|
||||
"label": "Continue loop",
|
||||
"subtitle": "Continue loop"
|
||||
}
|
||||
},
|
||||
"Microsoft.DateTimeInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for a date or a time",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Date Time Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.DebugBreak": {
|
||||
"form": {
|
||||
"label": "Debug Break"
|
||||
|
@ -257,169 +313,6 @@
|
|||
"subtitle": "Log Action"
|
||||
}
|
||||
},
|
||||
"Microsoft.RepeatDialog": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
|
||||
"label": "Repeat this dialog",
|
||||
"order": [
|
||||
"options",
|
||||
"*"
|
||||
],
|
||||
"subtitle": "Repeat Dialog"
|
||||
}
|
||||
},
|
||||
"Microsoft.ReplaceDialog": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
|
||||
"label": "Replace this dialog",
|
||||
"order": [
|
||||
"dialog",
|
||||
"options",
|
||||
"*"
|
||||
],
|
||||
"subtitle": "Replace Dialog"
|
||||
}
|
||||
},
|
||||
"Microsoft.SendActivity": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-send-activity",
|
||||
"label": "Send a response",
|
||||
"order": [
|
||||
"activity",
|
||||
"*"
|
||||
],
|
||||
"subtitle": "Send Activity"
|
||||
}
|
||||
},
|
||||
"Microsoft.SetProperties": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-using-memory",
|
||||
"label": "Set properties",
|
||||
"properties": {
|
||||
"assignments": {
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"subtitle": "Set Properties"
|
||||
}
|
||||
},
|
||||
"Microsoft.SetProperty": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-using-memory",
|
||||
"label": "Set a property",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Set Property"
|
||||
}
|
||||
},
|
||||
"Microsoft.SignOutUser": {
|
||||
"form": {
|
||||
"label": "Sign out user",
|
||||
"subtitle": "Signout User"
|
||||
}
|
||||
},
|
||||
"Microsoft.SwitchCondition": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-controlling-conversation-flow",
|
||||
"hidden": [
|
||||
"default"
|
||||
],
|
||||
"label": "Branch: Switch (multiple options)",
|
||||
"properties": {
|
||||
"cases": {
|
||||
"hidden": [
|
||||
"actions"
|
||||
]
|
||||
},
|
||||
"condition": {
|
||||
"intellisenseScopes": [
|
||||
"user-variables"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Switch Condition"
|
||||
}
|
||||
},
|
||||
"Microsoft.ThrowException": {
|
||||
"form": {
|
||||
"label": "Throw an exception",
|
||||
"subtitle": "Throw an exception"
|
||||
}
|
||||
},
|
||||
"Microsoft.TraceActivity": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-debugging-bots",
|
||||
"label": "Emit a trace event",
|
||||
"subtitle": "Trace Activity"
|
||||
}
|
||||
},
|
||||
"Microsoft.AttachmentInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for a file or an attachment",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Attachment Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.ChoiceInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt with multi-choice",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Choice Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.ConfirmInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for confirmation",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Confirm Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.DateTimeInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for a date or a time",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Date Time Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.NumberInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
|
@ -445,27 +338,6 @@
|
|||
"subtitle": "OAuth Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.TextInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for text",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Text Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.RegexRecognizer": {
|
||||
"form": {
|
||||
"hidden": [
|
||||
"entities"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Microsoft.OnActivity": {
|
||||
"form": {
|
||||
"hidden": [
|
||||
|
@ -729,5 +601,133 @@
|
|||
],
|
||||
"subtitle": "Unknown intent recognized"
|
||||
}
|
||||
},
|
||||
"Microsoft.RegexRecognizer": {
|
||||
"form": {
|
||||
"hidden": [
|
||||
"entities"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Microsoft.RepeatDialog": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
|
||||
"label": "Repeat this dialog",
|
||||
"order": [
|
||||
"options",
|
||||
"*"
|
||||
],
|
||||
"subtitle": "Repeat Dialog"
|
||||
}
|
||||
},
|
||||
"Microsoft.ReplaceDialog": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
|
||||
"label": "Replace this dialog",
|
||||
"order": [
|
||||
"dialog",
|
||||
"options",
|
||||
"*"
|
||||
],
|
||||
"subtitle": "Replace Dialog"
|
||||
}
|
||||
},
|
||||
"Microsoft.SendActivity": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-send-activity",
|
||||
"label": "Send a response",
|
||||
"order": [
|
||||
"activity",
|
||||
"*"
|
||||
],
|
||||
"subtitle": "Send Activity"
|
||||
}
|
||||
},
|
||||
"Microsoft.SetProperties": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-using-memory",
|
||||
"label": "Set properties",
|
||||
"properties": {
|
||||
"assignments": {
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"subtitle": "Set Properties"
|
||||
}
|
||||
},
|
||||
"Microsoft.SetProperty": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-using-memory",
|
||||
"label": "Set a property",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Set Property"
|
||||
}
|
||||
},
|
||||
"Microsoft.SignOutUser": {
|
||||
"form": {
|
||||
"label": "Sign out user",
|
||||
"subtitle": "Signout User"
|
||||
}
|
||||
},
|
||||
"Microsoft.SwitchCondition": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-controlling-conversation-flow",
|
||||
"hidden": [
|
||||
"default"
|
||||
],
|
||||
"label": "Branch: Switch (multiple options)",
|
||||
"properties": {
|
||||
"cases": {
|
||||
"hidden": [
|
||||
"actions"
|
||||
]
|
||||
},
|
||||
"condition": {
|
||||
"intellisenseScopes": [
|
||||
"user-variables"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Switch Condition"
|
||||
}
|
||||
},
|
||||
"Microsoft.TextInput": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
|
||||
"label": "Prompt for text",
|
||||
"properties": {
|
||||
"property": {
|
||||
"intellisenseScopes": [
|
||||
"variable-scopes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subtitle": "Text Input"
|
||||
}
|
||||
},
|
||||
"Microsoft.ThrowException": {
|
||||
"form": {
|
||||
"label": "Throw an exception",
|
||||
"subtitle": "Throw an exception"
|
||||
}
|
||||
},
|
||||
"Microsoft.TraceActivity": {
|
||||
"form": {
|
||||
"helpLink": "https://aka.ms/bfc-debugging-bots",
|
||||
"label": "Emit a trace event",
|
||||
"subtitle": "Trace Activity"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
@echo Updating test schema files.
|
||||
cd ..
|
||||
bf dialog:merge libraries/**/*.schema libraries/**/*.uischema tests/**/*.schema -o tests/tests.schema --verbose
|
||||
cd tests
|
||||
|
|
Загрузка…
Ссылка в новой задаче