Upgrade .Net Core to 2.1

This commit is contained in:
Oceania2018 2018-06-05 06:40:45 -05:00
parent 33d6aa1f2a
commit 96e976fbe0
6 changed files with 17 additions and 20 deletions

View file

@ -8,16 +8,16 @@
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Haiping Chen</Authors>
<Company />
<Product>BotSharp.Core</Product>
<Description>.Net implementation of open chatbot platform like google Dialogflow. Modulized design supports different NLU engine as backend.</Description>
<Description>Upgrade .Net Core to 2.1</Description>
<RepositoryType>MIT</RepositoryType>
<RepositoryUrl>https://github.com/Oceania2018/BotSharp</RepositoryUrl>
<PackageTags>NLU, Chatbot, Bot, AI Bot</PackageTags>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<PackageReleaseNotes>Support Rasa NLU 0.12.x</PackageReleaseNotes>
<Copyright>Since 2018 Haiping Chen</Copyright>
<PackageProjectUrl>https://github.com/Oceania2018/BotSharp</PackageProjectUrl>
@ -30,9 +30,9 @@
<ItemGroup>
<PackageReference Include="DotNetToolkit" Version="1.4.0" />
<PackageReference Include="EntityFrameworkCore.BootKit" Version="1.5.4" />
<PackageReference Include="EntityFrameworkCore.BootKit" Version="1.6.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="RestSharp" Version="106.2.2" />
<PackageReference Include="RestSharp" Version="106.3.0" />
</ItemGroup>
</Project>

View file

@ -473,8 +473,9 @@ namespace BotSharp.Core.Engines
#if RASA_NLU_0_11
rest.AddParameter("application/json", json, ParameterType.RequestBody);
#else
string body = File.ReadAllText($"{Database.ContentRootPath}{Path.DirectorySeparatorChar}Settings{Path.DirectorySeparatorChar}config_jieba_mitie_sklearn.yml");
body = body.Replace("@data", json);
string trainingConfig = console.agent.Language == "zh" ? "config_jieba_mitie_sklearn.yml" : "config_spacy.yml";
string body = File.ReadAllText($"{Database.ContentRootPath}{Path.DirectorySeparatorChar}Settings{Path.DirectorySeparatorChar}{trainingConfig}");
body = $"{body}\r\ndata: {json}";
rest.AddParameter("application/x-yml", body, ParameterType.RequestBody);
#endif

View file

@ -24,11 +24,6 @@ namespace BotSharp.Core.Intents
public static String CreateIntent(this Agent agent, Database dc, Intent intent)
{
if (String.IsNullOrEmpty(intent.Id))
{
intent.Id = Guid.NewGuid().ToString();
}
if (dc.Table<Intent>().Any(x => x.Id == intent.Id)) return intent.Id;
dc.Table<Intent>().Add(intent);

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
@ -221,11 +221,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.2.1" />
<PackageReference Include="MSTest.TestFramework" Version="1.2.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.1" />
</ItemGroup>
<ItemGroup>

View file

@ -9,5 +9,3 @@ pipeline:
- name: "intent_entity_featurizer_regex"
- name: "intent_featurizer_mitie"
- name: "intent_classifier_sklearn"
data: @data

View file

@ -0,0 +1,3 @@
language: "en"
pipeline: "spacy_sklearn"