Upgrade LLamaSharp to v0.12
This commit is contained in:
parent
53bae70a5a
commit
434b7a68e7
|
|
@ -22,17 +22,19 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.4" />
|
||||
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="8.0.0" />
|
||||
<PackageReference Include="AspNet.Security.OAuth.Keycloak" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.2" />
|
||||
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="6.0.27" />
|
||||
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="6.0.15" />
|
||||
<PackageReference Include="AspNet.Security.OAuth.Keycloak" Version="6.0.15" />
|
||||
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.25" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.26" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -126,6 +126,20 @@ public static class BotSharpOpenApiExtensions
|
|||
});
|
||||
}
|
||||
|
||||
// Wexin OAuth
|
||||
if (!string.IsNullOrWhiteSpace(config["OAuth:Wexin:ClientId"]) && !string.IsNullOrWhiteSpace(config["OAuth:Wexin:ClientSecret"]))
|
||||
{
|
||||
builder = builder.AddWeixin(options =>
|
||||
{
|
||||
options.ClientId = config["OAuth:GitHub:ClientId"];
|
||||
options.ClientSecret = config["OAuth:GitHub:ClientSecret"];
|
||||
options.Scope.Add("user:email");
|
||||
options.Backchannel = builder.Services.BuildServiceProvider()
|
||||
.GetRequiredService<IHttpClientFactory>()
|
||||
.CreateClient();
|
||||
});
|
||||
}
|
||||
|
||||
// Add services to the container.
|
||||
services.AddControllers()
|
||||
.AddJsonOptions(options =>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LLamaSharp" Version="0.11.2" />
|
||||
<PackageReference Include="LLamaSharp" Version="0.12.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@
|
|||
"ClientId": "",
|
||||
"ClientSecret": "",
|
||||
"Version": 22
|
||||
},
|
||||
"Weixin": {
|
||||
"AppId": "",
|
||||
"AppSecret": ""
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue