-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: BREAKING CHANGES: refactor project.
- Loading branch information
1 parent
252d819
commit fa0f18f
Showing
78 changed files
with
450 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<Version>0.0.0.1</Version> | ||
<Authors>arthuridea</Authors> | ||
<LangVersion>latest</LangVersion> | ||
<Description>A dotnet Library for Baidu ernie-bot and ErnievilgV2</Description> | ||
<Copyright>MIT</Copyright> | ||
<PackageTags>A dotnet Library for Baidu ernie-bot and ErnievilgV2</PackageTags> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<PackageProjectUrl>https://github.com/arthuridea/NetCore.BaiduAIGC</PackageProjectUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/arthuridea/NetCore.BaiduAIGC.git</RepositoryUrl> | ||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\LICENSE.md"> | ||
<Pack>True</Pack> | ||
<PackagePath>\</PackagePath> | ||
</None> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34202.233 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LLMServiceHub", "src\LLMServiceHub\LLMServiceHub.csproj", "{3CA26111-12C9-4AF1-966F-45019EA52385}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00.Global", "00.Global", "{3BBFC57A-DC8F-4F03-8370-FD6179AD317F}" | ||
ProjectSection(SolutionItems) = preProject | ||
.gitignore = .gitignore | ||
Directory.Build.props = Directory.Build.props | ||
LICENSE.md = LICENSE.md | ||
README.md = README.md | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01.Src", "01.Src", "{01705FE5-59E6-4B65-B545-5DFD3AFB1F16}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LLMService.Shared", "src\LLMService.Shared\LLMService.Shared.csproj", "{DC8A11BE-3268-4F1E-B83F-27958041ABF1}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLMService.Baidu.Wenxinworkshop", "src\LLMService.Baidu.Wenxinworkshop\LLMService.Baidu.Wenxinworkshop.csproj", "{E73CB18F-26D3-4A6C-8AA2-E89FF17B65C5}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLMService.Baidu.ErnieVilg", "src\LLMService.Baidu.ErnieVilg\LLMService.Baidu.ErnieVilg.csproj", "{E3AE89E4-31A0-4EDA-9154-2D089E1FD8A4}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3CA26111-12C9-4AF1-966F-45019EA52385}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3CA26111-12C9-4AF1-966F-45019EA52385}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3CA26111-12C9-4AF1-966F-45019EA52385}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3CA26111-12C9-4AF1-966F-45019EA52385}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{DC8A11BE-3268-4F1E-B83F-27958041ABF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{DC8A11BE-3268-4F1E-B83F-27958041ABF1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{DC8A11BE-3268-4F1E-B83F-27958041ABF1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{DC8A11BE-3268-4F1E-B83F-27958041ABF1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{E73CB18F-26D3-4A6C-8AA2-E89FF17B65C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E73CB18F-26D3-4A6C-8AA2-E89FF17B65C5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E73CB18F-26D3-4A6C-8AA2-E89FF17B65C5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E73CB18F-26D3-4A6C-8AA2-E89FF17B65C5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{E3AE89E4-31A0-4EDA-9154-2D089E1FD8A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E3AE89E4-31A0-4EDA-9154-2D089E1FD8A4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E3AE89E4-31A0-4EDA-9154-2D089E1FD8A4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E3AE89E4-31A0-4EDA-9154-2D089E1FD8A4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{3CA26111-12C9-4AF1-966F-45019EA52385} = {01705FE5-59E6-4B65-B545-5DFD3AFB1F16} | ||
{DC8A11BE-3268-4F1E-B83F-27958041ABF1} = {01705FE5-59E6-4B65-B545-5DFD3AFB1F16} | ||
{E73CB18F-26D3-4A6C-8AA2-E89FF17B65C5} = {01705FE5-59E6-4B65-B545-5DFD3AFB1F16} | ||
{E3AE89E4-31A0-4EDA-9154-2D089E1FD8A4} = {01705FE5-59E6-4B65-B545-5DFD3AFB1F16} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {4FD3BE39-36D7-4A01-8EEC-39063ED813B4} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/LLMService.Baidu.ErnieVilg/Extensions/ErnieVilgDependencyInjection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using LLMService.Baidu.ErnieVilg; | ||
using LLMService.Shared; | ||
using LLMService.Shared.Authentication.Handlers; | ||
using LLMService.Shared.Authentication.Models; | ||
using LLMService.Shared.Models; | ||
using LLMService.Shared.ServiceInterfaces; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
// *************************************************************************************** | ||
// DO NOT CHANGE THE NAMESPACE! It is .Net Core convention for configuration extensions. * | ||
// *************************************************************************************** | ||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public static class ErnieVilgDependencyInjection | ||
{ | ||
/// <summary> | ||
/// Adds the wenxinworkshop. | ||
/// </summary> | ||
/// <param name="services">The services.</param> | ||
/// <param name="configuration">The configuration.</param> | ||
/// <param name="ernieVilgConfigKey"></param> | ||
/// <returns></returns> | ||
public static IServiceCollection AddErnieVilg(this IServiceCollection services, IConfiguration configuration, string ernieVilgConfigKey = "BaiduErnieVilgSettings") | ||
{ | ||
// 百度配置文件 | ||
var ernieVilgSettings = configuration.GetSection(ernieVilgConfigKey).Get<ClientCredentials>(); | ||
|
||
// 智能绘画客户端 | ||
services.AddHttpClient(LLMServiceConsts.BaiduErnieVilgApiClientName, client => | ||
{ | ||
client.BaseAddress = new Uri($"{LLMServiceConsts.BaiduErnieVilgApiAuthority}/"); | ||
}) | ||
.AddBaiduApiAuthentication<BaiduApiAuthenticationHandler>( | ||
ernieVilgSettings, | ||
LLMServiceConsts.BaiduErnieVilgApiAuthority); | ||
|
||
services.AddTransient<IAIPaintApiService<PaintApplyRequest, PaintResultResponse>, BaiduErnieVilgApiService>(); | ||
|
||
return services; | ||
} | ||
} | ||
} |
Oops, something went wrong.