😎拆分AiChat至插件工程
This commit is contained in:
parent
622274a750
commit
df56329943
@ -47,7 +47,12 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Admin.NET.Core\Admin.NET.Core.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.Ai\Admin.NET.Plugin.Ai.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.ApprovalFlow\Admin.NET.Plugin.ApprovalFlow.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.DingTalk\Admin.NET.Plugin.DingTalk.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.GoView\Admin.NET.Plugin.GoView.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.K3Cloud\Admin.NET.Plugin.K3Cloud.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.PaddleOCR\Admin.NET.Plugin.PaddleOCR.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.ReZero\Admin.NET.Plugin.ReZero.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.WorkWeixin\Admin.NET.Plugin.WorkWeixin.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -14,5 +14,5 @@ public class ApplicationConst
|
||||
/// <summary>
|
||||
/// API分组名称
|
||||
/// </summary>
|
||||
public const string GroupName = "xxx业务应用";
|
||||
public const string GroupName = "测试业务";
|
||||
}
|
||||
@ -4,7 +4,6 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
global using Admin.NET.Application.Entity;
|
||||
global using Admin.NET.Core;
|
||||
global using Admin.NET.Core.Service;
|
||||
global using Furion;
|
||||
@ -12,7 +11,6 @@ global using Furion.DependencyInjection;
|
||||
global using Furion.DynamicApiController;
|
||||
global using Furion.EventBus;
|
||||
global using Furion.FriendlyException;
|
||||
global using Mapster;
|
||||
global using Microsoft.AspNetCore.Authorization;
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Plugin.Ai;
|
||||
|
||||
namespace Admin.NET.Application.Service.LLM;
|
||||
|
||||
[ApiDescriptionSettings(Name = "LLMChangeModelTest", Description = "LLM测试,可以切换模型")]
|
||||
|
||||
@ -11,7 +11,7 @@ namespace Admin.NET.Application;
|
||||
/// <summary>
|
||||
/// 开放接口示例
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings("开放接口", Name = "Demo", Order = 100)]
|
||||
[ApiDescriptionSettings(ApplicationConst.GroupName, Name = "Demo", Order = 100)]
|
||||
public class DemoOpenApi : IDynamicApiController
|
||||
{
|
||||
private readonly UserManager _userManager;
|
||||
@ -20,24 +20,24 @@ public class DemoOpenApi : IDynamicApiController
|
||||
{
|
||||
_userManager = userManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SignatureAuthentication
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// SignatureAuthentication
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("helloWordSignatureAuthentication")]
|
||||
[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)]
|
||||
[HttpGet("helloWordSignatureAuthentication")]
|
||||
[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)]
|
||||
public Task<string> HelloWordSignatureAuthentication()
|
||||
{
|
||||
return Task.FromResult($"Hello 只能支持 OpenApi, {_userManager.Account}.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SignatureAuthenticationJwt
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("HelloWordSignatureAuthenticationOrJwt")]
|
||||
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)]
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SignatureAuthenticationJwt
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("HelloWordSignatureAuthenticationOrJwt")]
|
||||
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)]
|
||||
public Task<string> HelloWordSignatureAuthenticationOrJwt()
|
||||
{
|
||||
return Task.FromResult($"Hello 支持 OpenApi 或 Jwt, {_userManager.Account}.");
|
||||
|
||||
@ -60,15 +60,6 @@
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1273" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
<PackageReference Include="microsoft.semantickernel" Version="1.65.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Agents.Core" Version="1.65.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Amazon" Version="1.56.0-alpha" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Google" Version="1.54.0-alpha" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.HuggingFace" Version="1.56.0-preview" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Ollama" Version="1.54.0-alpha" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Qdrant" Version="1.54.0-preview" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.PromptTemplates.Handlebars" Version="1.65.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Yaml" Version="1.65.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
|
||||
|
||||
@ -14,6 +14,8 @@ public class TreeTableRelationshipCodeGenStrategy : CodeGenTableStrategyBase<Sys
|
||||
{
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
|
||||
// TODO 关系对照带树组件生成逻辑
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -34,7 +34,6 @@ global using Microsoft.Extensions.DependencyInjection;
|
||||
global using Microsoft.Extensions.Hosting;
|
||||
global using Microsoft.Extensions.Logging;
|
||||
global using Microsoft.Extensions.Options;
|
||||
global using Microsoft.SemanticKernel;
|
||||
global using NewLife;
|
||||
global using NewLife.Caching;
|
||||
global using Newtonsoft.Json.Linq;
|
||||
|
||||
@ -44,8 +44,6 @@ public static class ProjectOptions
|
||||
services.Configure<ClientRateLimitOptions>(App.Configuration.GetSection("ClientRateLimiting"));
|
||||
services.Configure<ClientRateLimitPolicies>(App.Configuration.GetSection("ClientRateLimitPolicies"));
|
||||
|
||||
services.AddConfigurableOptions<LLMOptions>(); // 基于Microsoft Semantic Kernel实现,也是本应用的默认实现
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@ -173,10 +173,6 @@ public class Startup : AppStartup
|
||||
// SqlSugar
|
||||
services.AddSqlSugar();
|
||||
|
||||
// 注册LLM大模型
|
||||
services.AddLLMFactory(); // 注册LLM模型工厂,如果需要切换模型,请引入ILLMFactory接口,调用CreateKernel方法获取Kernel实例
|
||||
services.AddLLM(); // 注册LLM大模型,注意:此扩展不能切换模型,只能使用一个模型
|
||||
|
||||
// 三方授权登录OAuth
|
||||
services.AddOAuth();
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.0.11010.61 d18.0
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36429.23 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Application", "Admin.NET.Application\Admin.NET.Application.csproj", "{C3F5AEC5-ACEE-4109-94E3-3F981DC18268}"
|
||||
EndProject
|
||||
@ -34,6 +34,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Plugin.WorkWeixin
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Test", "Admin.NET.Test\Admin.NET.Test.csproj", "{8F4A19E9-EEBC-483A-A78B-06F1CE852C7A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.NET.Plugin.Ai", "Plugins\Admin.NET.Plugin.Ai\Admin.NET.Plugin.Ai.csproj", "{EB254721-C73C-4B1F-B9D7-0D989409F0C8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -88,6 +90,10 @@ Global
|
||||
{8F4A19E9-EEBC-483A-A78B-06F1CE852C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F4A19E9-EEBC-483A-A78B-06F1CE852C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F4A19E9-EEBC-483A-A78B-06F1CE852C7A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB254721-C73C-4B1F-B9D7-0D989409F0C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB254721-C73C-4B1F-B9D7-0D989409F0C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB254721-C73C-4B1F-B9D7-0D989409F0C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB254721-C73C-4B1F-B9D7-0D989409F0C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -100,6 +106,7 @@ Global
|
||||
{9EB9C39E-E14F-443E-9AA3-EE417ABCBC1D} = {76F70D22-8D53-468E-A3B6-1704666A1D71}
|
||||
{1B106C11-E5BF-44AB-A283-1E948A8BD8C2} = {76F70D22-8D53-468E-A3B6-1704666A1D71}
|
||||
{12998618-A875-4580-B5B1-0CC50CE85F27} = {76F70D22-8D53-468E-A3B6-1704666A1D71}
|
||||
{EB254721-C73C-4B1F-B9D7-0D989409F0C8} = {76F70D22-8D53-468E-A3B6-1704666A1D71}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5CD801D7-984A-4F5C-8FA2-211B7A5EA9F3}
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
||||
<NoWarn>1701;1702;1591;8632</NoWarn>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<Copyright>Admin.NET</Copyright>
|
||||
<Description>Admin.NET 通用权限开发平台</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Configuration\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="microsoft.semantickernel" Version="1.65.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Agents.Core" Version="1.65.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Amazon" Version="1.56.0-alpha" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Google" Version="1.54.0-alpha" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.HuggingFace" Version="1.56.0-preview" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Ollama" Version="1.54.0-alpha" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Qdrant" Version="1.54.0-preview" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.PromptTemplates.Handlebars" Version="1.65.0" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Yaml" Version="1.65.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Admin.NET.Core\Admin.NET.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
19
Admin.NET/Plugins/Admin.NET.Plugin.Ai/Const/AiConst.cs
Normal file
19
Admin.NET/Plugins/Admin.NET.Plugin.Ai/Const/AiConst.cs
Normal file
@ -0,0 +1,19 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// Ai 相关常量
|
||||
/// </summary>
|
||||
[Const("Ai 相关常量")]
|
||||
public class AiConst
|
||||
{
|
||||
/// <summary>
|
||||
/// API分组名称
|
||||
/// </summary>
|
||||
public const string GroupName = "AiChat";
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天历史表
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天摘要历史表
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据库的动作枚举
|
||||
@ -4,9 +4,9 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core.Ai.Service;
|
||||
using Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
public static class LLMFactoryExtention
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM注册扩展类
|
||||
31
Admin.NET/Plugins/Admin.NET.Plugin.Ai/GlobalUsings.cs
Normal file
31
Admin.NET/Plugins/Admin.NET.Plugin.Ai/GlobalUsings.cs
Normal file
@ -0,0 +1,31 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
global using Admin.NET.Core;
|
||||
global using Admin.NET.Core.Service;
|
||||
global using Admin.NET.Plugin.Ai;
|
||||
global using Furion;
|
||||
global using Furion.ConfigurableOptions;
|
||||
global using Furion.DependencyInjection;
|
||||
global using Furion.DynamicApiController;
|
||||
global using Furion.Logging.Extensions;
|
||||
global using Magicodes.ExporterAndImporter.Core.Extension;
|
||||
global using Mapster;
|
||||
global using Microsoft.AspNetCore.Authorization;
|
||||
global using Microsoft.AspNetCore.Http;
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
global using Microsoft.Extensions.Logging;
|
||||
global using Microsoft.Extensions.Options;
|
||||
global using Microsoft.SemanticKernel;
|
||||
global using NewLife;
|
||||
global using SqlSugar;
|
||||
global using System.Collections.Concurrent;
|
||||
global using System.ComponentModel.DataAnnotations;
|
||||
global using System.Data;
|
||||
global using System.Linq.Dynamic.Core;
|
||||
global using System.Text;
|
||||
global using System.Text.RegularExpressions;
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
public class LLMDelegatingHandler : DelegatingHandler
|
||||
{
|
||||
@ -7,7 +7,7 @@
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
public class LoggingHandler : DelegatingHandler
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM工厂接口
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// SSE通道管理接口
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM请求体
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM模型输入
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM输出
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// 手动实现LLM接口配置选项
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM配置选项
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class ChatInput
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class ChatListInput : BasePageInput
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天列表输出
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class ChatOutput
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class ModelListChangeInput : ModelListOutputItem
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 模型列表输出
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using Microsoft.SemanticKernel.ChatCompletion;
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天补全核心服务
|
||||
@ -4,12 +4,12 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// LLM聊天补全服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Description = "LLM聊天补全服务", Name = "LLMChat", Order = 100)]
|
||||
[ApiDescriptionSettings(AiConst.GroupName, Name = "LLMChat", Description = "LLM聊天补全服务", Order = 100)]
|
||||
public class LLMChatService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ILogger<LLMChatService> _logger;
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class LLMOptionService : ITransient
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 异步对数据库进行操作
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class ChatChannelManager : ISingleton
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
public class DataActionInput
|
||||
{
|
||||
@ -9,7 +9,7 @@ using Amazon.Runtime;
|
||||
using OllamaSharp;
|
||||
using System.Net;
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 模型切换工厂
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// OpenRouter 客户端
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// SSE通道管理
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天通道管理
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 深度思考通道管理
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Ai.Service;
|
||||
namespace Admin.NET.Plugin.Ai.Service;
|
||||
|
||||
/// <summary>
|
||||
/// SSE服务
|
||||
27
Admin.NET/Plugins/Admin.NET.Plugin.Ai/Startup.cs
Normal file
27
Admin.NET/Plugins/Admin.NET.Plugin.Ai/Startup.cs
Normal file
@ -0,0 +1,27 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace Admin.NET.Plugin.GoView;
|
||||
|
||||
[AppStartup(100)]
|
||||
public class Startup : AppStartup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddConfigurableOptions<LLMOptions>(); // 基于Microsoft Semantic Kernel实现,也是本应用的默认实现
|
||||
|
||||
// 注册LLM大模型
|
||||
services.AddLLMFactory(); // 注册LLM模型工厂,如果需要切换模型,请引入ILLMFactory接口,调用CreateKernel方法获取Kernel实例
|
||||
services.AddLLM(); // 注册LLM大模型,注意:此扩展不能切换模型,只能使用一个模型
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Plugin.Ai;
|
||||
|
||||
/// <summary>
|
||||
/// LLM JSON 工具类
|
||||
@ -15,5 +15,5 @@ public class ApprovalFlowConst
|
||||
/// <summary>
|
||||
/// API分组名称
|
||||
/// </summary>
|
||||
public const string GroupName = "审批流程";
|
||||
public const string GroupName = "DataApproval";
|
||||
}
|
||||
@ -19,7 +19,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new SysMenu{ Id=1320000000001, Pid=1310000000301, Title="审批流程", Path="/platform/approvalFlow", Name="approvalFlow", Component="/approvalFlow/index", Icon="ele-Help", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=2000 },
|
||||
new SysMenu{ Id=1320000000001, Pid=1310000000301, Title="数据审批", Path="/platform/dataApproval", Name="dataApproval", Component="/dataApproval/index", Icon="ele-Help", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=2000 },
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -15,5 +15,5 @@ public class GoViewConst
|
||||
/// <summary>
|
||||
/// API分组名称
|
||||
/// </summary>
|
||||
public const string GroupName = "GoView 大屏可视化";
|
||||
public const string GroupName = "GoView";
|
||||
}
|
||||
@ -15,5 +15,5 @@ public class ApplicationConst
|
||||
/// <summary>
|
||||
/// API分组名称
|
||||
/// </summary>
|
||||
public const string GroupName = "PaddleOCR 图像识别";
|
||||
public const string GroupName = "PaddleOCR";
|
||||
}
|
||||
@ -7,10 +7,10 @@ set moduleName=system
|
||||
set apiServicesPath=%dir%..\src\api-services\system\
|
||||
set apiUrl=http://localhost:5005/swagger/Default/swagger.json
|
||||
|
||||
if "%1"=="approvalFlow" (
|
||||
set moduleName=approvalFlow
|
||||
set apiServicesPath=%dir%..\src\api-services\approvalFlow\
|
||||
set apiUrl=http://localhost:5005/swagger/ApprovalFlow/swagger.json
|
||||
if "%1"=="dataApproval" (
|
||||
set moduleName=dataApproval
|
||||
set apiServicesPath=%dir%..\src\api-services\dataApproval\
|
||||
set apiUrl=http://localhost:5005/swagger/DataApproval/swagger.json
|
||||
) else if "%1"=="dingTalk" (
|
||||
set moduleName=dingTalk
|
||||
set apiServicesPath=%dir%..\src\api-services\dingTalk\
|
||||
@ -18,7 +18,11 @@ if "%1"=="approvalFlow" (
|
||||
) else if "%1"=="goView" (
|
||||
set moduleName=goView
|
||||
set apiServicesPath=%dir%..\src\api-services\goView\
|
||||
set apiUrl=http://localhost:5005/swagger/GoView%%20%%E5%%A4%%A7%%E5%%B1%%8F%%E5%%8F%%AF%%E8%%A7%%86%%E5%%8C%%96/swagger.json
|
||||
set apiUrl=http://localhost:5005/swagger/GoView/swagger.json
|
||||
) else if "%1"=="aiChat" (
|
||||
set moduleName=aiChat
|
||||
set apiServicesPath=%dir%..\src\api-services\aiChat\
|
||||
set apiUrl=http://localhost:5005/swagger/AiChat/swagger.json
|
||||
)
|
||||
|
||||
if exist %apiServicesPath% (
|
||||
|
||||
15
Web/src/api-services/aiChat/api.ts
Normal file
15
Web/src/api-services/aiChat/api.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
export * from './apis/llmchat-api';
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
70
Web/src/api-services/aiChat/base.ts
Normal file
70
Web/src/api-services/aiChat/base.ts
Normal file
@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosRequestConfig, AxiosInstance } from 'axios';
|
||||
|
||||
export const BASE_PATH = "/".replace(/\/+$/, "");
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RequestArgs
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration | undefined;
|
||||
|
||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
name: "RequiredError" = "RequiredError";
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
83
Web/src/api-services/aiChat/configuration.ts
Normal file
83
Web/src/api-services/aiChat/configuration.ts
Normal file
@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
basePath?: string;
|
||||
baseOptions?: any;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
*
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
*
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
/**
|
||||
* base options for axios calls
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
baseOptions?: any;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
this.baseOptions = param.baseOptions;
|
||||
}
|
||||
}
|
||||
18
Web/src/api-services/aiChat/index.ts
Normal file
18
Web/src/api-services/aiChat/index.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export * from "./api";
|
||||
export * from "./configuration";
|
||||
export * from "./models";
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultBoolean
|
||||
*/
|
||||
export interface AdminNETResultBoolean {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultBoolean
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultBoolean
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultBoolean
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AdminNETResultBoolean
|
||||
*/
|
||||
result?: boolean;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultBoolean
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultBoolean
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
25
Web/src/api-services/aiChat/models/filter-logic-enum.ts
Normal file
25
Web/src/api-services/aiChat/models/filter-logic-enum.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 过滤条件<br /> 并且 And = 0<br /> 或者 Or = 1<br /> 异或 Xor = 2<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum FilterLogicEnum {
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2
|
||||
}
|
||||
|
||||
31
Web/src/api-services/aiChat/models/filter-operator-enum.ts
Normal file
31
Web/src/api-services/aiChat/models/filter-operator-enum.ts
Normal file
@ -0,0 +1,31 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 过滤逻辑运算符<br /> 等于 EQ = 0<br /> 不等于 NEQ = 1<br /> 小于 LT = 2<br /> 小于等于 LTE = 3<br /> 大于 GT = 4<br /> 大于等于 GTE = 5<br /> 开始包含 StartsWith = 6<br /> 末尾包含 EndsWith = 7<br /> 包含 Contains = 8<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum FilterOperatorEnum {
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2,
|
||||
NUMBER_3 = 3,
|
||||
NUMBER_4 = 4,
|
||||
NUMBER_5 = 5,
|
||||
NUMBER_6 = 6,
|
||||
NUMBER_7 = 7,
|
||||
NUMBER_8 = 8
|
||||
}
|
||||
|
||||
62
Web/src/api-services/aiChat/models/filter.ts
Normal file
62
Web/src/api-services/aiChat/models/filter.ts
Normal file
@ -0,0 +1,62 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Filter } from './filter';
|
||||
import { FilterLogicEnum } from './filter-logic-enum';
|
||||
import { FilterOperatorEnum } from './filter-operator-enum';
|
||||
/**
|
||||
* 筛选过滤条件
|
||||
*
|
||||
* @export
|
||||
* @interface Filter
|
||||
*/
|
||||
export interface Filter {
|
||||
|
||||
/**
|
||||
* @type {FilterLogicEnum}
|
||||
* @memberof Filter
|
||||
*/
|
||||
logic?: FilterLogicEnum;
|
||||
|
||||
/**
|
||||
* 筛选过滤条件子项
|
||||
*
|
||||
* @type {Array<Filter>}
|
||||
* @memberof Filter
|
||||
* @example []
|
||||
*/
|
||||
filters?: Array<Filter> | null;
|
||||
|
||||
/**
|
||||
* 字段名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Filter
|
||||
*/
|
||||
field?: string | null;
|
||||
|
||||
/**
|
||||
* @type {FilterOperatorEnum}
|
||||
* @memberof Filter
|
||||
*/
|
||||
operator?: FilterOperatorEnum;
|
||||
|
||||
/**
|
||||
* 字段值
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Filter
|
||||
*/
|
||||
value?: any | null;
|
||||
}
|
||||
18
Web/src/api-services/aiChat/models/index.ts
Normal file
18
Web/src/api-services/aiChat/models/index.ts
Normal file
@ -0,0 +1,18 @@
|
||||
export * from './admin-netresult-boolean';
|
||||
export * from './admin-netresult-chat-output';
|
||||
export * from './admin-netresult-model-list-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-chat-list-output';
|
||||
export * from './chat-input';
|
||||
export * from './chat-list-input';
|
||||
export * from './chat-list-output';
|
||||
export * from './chat-output';
|
||||
export * from './filter';
|
||||
export * from './filter-logic-enum';
|
||||
export * from './filter-operator-enum';
|
||||
export * from './llmchat-history';
|
||||
export * from './llmchat-summary-history';
|
||||
export * from './model-list-change-input';
|
||||
export * from './model-list-output';
|
||||
export * from './model-list-output-item';
|
||||
export * from './search';
|
||||
export * from './sql-sugar-paged-list-chat-list-output';
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
39
Web/src/api-services/aiChat/models/search.ts
Normal file
39
Web/src/api-services/aiChat/models/search.ts
Normal file
@ -0,0 +1,39 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 模糊查询条件
|
||||
*
|
||||
* @export
|
||||
* @interface Search
|
||||
*/
|
||||
export interface Search {
|
||||
|
||||
/**
|
||||
* 字段名称集合
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Search
|
||||
* @example []
|
||||
*/
|
||||
fields?: Array<string> | null;
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Search
|
||||
*/
|
||||
keyword?: string | null;
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
* AiChat
|
||||
* <br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user