Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
VA and Skill Template updates and synchronization (#2353)
Browse files Browse the repository at this point in the history
* added feedback middleware

* fixed skill luis telemetry bug

* Added feedback middleware

* updated to rc1

* updated skill sample from skill template

* updated template

* regenerated va sample from template

* added new sample

* removed unneeded packages

* added nuget package source to test projs

* fixed VA tests
  • Loading branch information
lauren-mills committed Sep 11, 2019
1 parent 3e0f74f commit 6b5b640
Show file tree
Hide file tree
Showing 71 changed files with 715 additions and 487 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.6.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.All" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.5.1" />
Expand Down Expand Up @@ -43,7 +39,7 @@

<ItemGroup>
<EmbeddedResource Update="Utterances\GeneralUtterances.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>GeneralUtterances.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Utterances\SampleDialogUtterances.resx">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public virtual void InitializeSkill()
LuisServices = new Dictionary<string, ITelemetryRecognizer>
{
{ "General", GeneralTestUtil.CreateRecognizer() },
{ "Skill", SkillTestUtil.CreateRecognizer() }
{ "SkillSample", SkillTestUtil.CreateRecognizer() }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ public class SkillTestUtil
{
private static Dictionary<string, IRecognizerConvert> _utterances = new Dictionary<string, IRecognizerConvert>
{
{ SampleDialogUtterances.Trigger, CreateIntent(SampleDialogUtterances.Trigger, SkillLuis.Intent.Sample) },
{ SampleDialogUtterances.Trigger, CreateIntent(SampleDialogUtterances.Trigger, SkillSampleLuis.Intent.Sample) },
};

public static MockLuisRecognizer CreateRecognizer()
{
var recognizer = new MockLuisRecognizer(defaultIntent: CreateIntent(string.Empty, SkillLuis.Intent.None));
var recognizer = new MockLuisRecognizer(defaultIntent: CreateIntent(string.Empty, SkillSampleLuis.Intent.None));
recognizer.RegisterUtterances(_utterances);
return recognizer;
}

public static SkillLuis CreateIntent(string userInput, SkillLuis.Intent intent)
public static SkillSampleLuis CreateIntent(string userInput, SkillSampleLuis.Intent intent)
{
var result = new SkillLuis
var result = new SkillSampleLuis
{
Text = userInput,
Intents = new Dictionary<SkillLuis.Intent, IntentScore>()
Intents = new Dictionary<SkillSampleLuis.Intent, IntentScore>()
};

result.Intents.Add(intent, new IntentScore() { Score = 0.9 });

result.Entities = new SkillLuis._Entities
result.Entities = new SkillSampleLuis._Entities
{
_instance = new SkillLuis._Entities._Instance()
_instance = new SkillSampleLuis._Entities._Instance()
};

return result;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6b5b640

Please sign in to comment.