Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ public override async Task<RecognizerResult> RecognizeAsync(DialogContext dialog
throw new ArgumentNullException(nameof(activity));
}

if (Recognizers.Any() == false)
{
return new RecognizerResult()
{
Intents = new Dictionary<string, IntentScore>() { { NoneIntent, new IntentScore() { Score = 1.0 } } }
};
}

EnsureRecognizerIds();

// run all of the recognizers in parallel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,11 @@ public async Task CrossTrainedRecognizerSetTests_AllNone()
{
await TestUtils.RunTestScript(ResourceExplorer);
}

[TestMethod]
public async Task CrossTrainedRecognizerSetTests_Empty()
{
await TestUtils.RunTestScript(ResourceExplorer);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "../../../tests.schema",
"$kind": "Microsoft.Test.Script",
"dialog": {
"$kind": "Microsoft.AdaptiveDialog",
"recognizer": {
"$schema": "../../../tests.schema",
"$kind": "Microsoft.CrossTrainedRecognizerSet",
"recognizers": [
]
},
"triggers": [
{
"$kind": "Microsoft.OnUnknownIntent",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "UnknownIntent:${turn.recognized.intent}"
}
]
}
],
"defaultResultProperty": "dialog.result"
},
"locale": "",
"script": [
{
"$kind": "Microsoft.Test.UserSays",
"text": "hi"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "UnknownIntent:None"
},
{
"$kind": "Microsoft.Test.UserSays",
"text": "x"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "UnknownIntent:None"
},
{
"$kind": "Microsoft.Test.UserSays",
"text": "y"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "UnknownIntent:None"
}
]
}