Aufteilung
This commit is contained in:
33
Service/Plugins/AiFunctionService.cs
Normal file
33
Service/Plugins/AiFunctionService.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using BS.Shared.DataContracts.Feature.AI.Functions.ServiceRecords;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Service.Plugins
|
||||
{
|
||||
public class AiFunctionService
|
||||
{
|
||||
public AiFunctionDocResponse ExecuteAiFunctionServiceRecordDocumentation(AiFunctionDocRequest request)
|
||||
{
|
||||
// Request valideren
|
||||
|
||||
// Request auswerten
|
||||
|
||||
// DB Daten holen
|
||||
|
||||
// DB Daten prüfen
|
||||
|
||||
// Anfrage zusammensetzen
|
||||
|
||||
// Anfrage abschicken
|
||||
|
||||
// Response auswerten
|
||||
|
||||
// Eigene Response erstellen
|
||||
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Service/Plugins/AiPromptbausteineService.cs
Normal file
39
Service/Plugins/AiPromptbausteineService.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Service.Plugins
|
||||
{
|
||||
public class AiPromptbausteineService
|
||||
{
|
||||
public IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteine()
|
||||
{
|
||||
var dc = new AiPromptbausteinTreeDC();
|
||||
|
||||
//dc.Oid = 1;
|
||||
//dc.IsParent = false;
|
||||
//dc.Version = 1;
|
||||
//dc.Text = "Beispiel";
|
||||
|
||||
return new List<AiPromptbausteinTreeDC> { dc };
|
||||
}
|
||||
|
||||
public IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDC)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteAiPromptbausteine(Dictionary<long, long> oid2version)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -459,6 +459,8 @@
|
||||
<Compile Include="Multitenancy\MultitenancyEndpointBehavior.cs" />
|
||||
<Compile Include="OwnChat\OwnChatHelper.cs" />
|
||||
<Compile Include="PivotTabelle\FlexibleReportManager.cs" />
|
||||
<Compile Include="Plugins\AiPromptbausteineService.cs" />
|
||||
<Compile Include="Plugins\AiFunctionService.cs" />
|
||||
<Compile Include="Plugins\AiService2.cs" />
|
||||
<Compile Include="Plugins\AiService.cs" />
|
||||
<Compile Include="Plugins\AccountingService.cs" />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using BS.Shared;
|
||||
using BS.Shared.Attributes;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using BS.Shared.DataContracts.Feature.AI.Functions.ServiceRecords;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -84,5 +85,9 @@ namespace BeWo.Service.ServiceContracts
|
||||
[RequirePermission(UserRightType.AiModulePromptbausteineRemove)]
|
||||
void DeleteAiPromptbausteine(Dictionary<long, long> oid2version);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
[RequirePermission(UserRightType.AiModulePromptbausteineView)]
|
||||
AiFunctionDocResponse ExecuteAiFunctionServiceRecordDocumentation(AiFunctionDocRequest request);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using BeWo.Service.Plugins;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using BS.Shared.DataContracts.Feature.AI.Functions.ServiceRecords;
|
||||
using System.Collections.Generic;
|
||||
using System.ServiceModel;
|
||||
|
||||
@@ -11,6 +12,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
||||
public class AiEnhancedServiceImp : IAiEnhancedService
|
||||
{
|
||||
#region General AI
|
||||
public AiConfigDC GetAiConfig()
|
||||
=> GetAiService().GetAiConfig();
|
||||
|
||||
@@ -45,32 +47,41 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var plugin = PluginLoader.FindClass<AiService2>();
|
||||
return plugin;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Promptbausteine
|
||||
public IEnumerable<AiPromptbausteinTreeDC> GetAiPromptbausteine()
|
||||
{
|
||||
var dc = new AiPromptbausteinTreeDC();
|
||||
|
||||
//dc.Oid = 1;
|
||||
//dc.IsParent = false;
|
||||
//dc.Version = 1;
|
||||
//dc.Text = "Beispiel";
|
||||
|
||||
return new List<AiPromptbausteinTreeDC> { dc };
|
||||
}
|
||||
=> GetAiPromptbausteineService().GetAiPromptbausteine();
|
||||
|
||||
public IEnumerable<AiPromptbausteinTreeDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDC)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
=> GetAiPromptbausteineService().CreateAiPromptbausteine(aiPromptbausteinDC);
|
||||
|
||||
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinTreeDC> aiPromptbausteinDCs)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
=> GetAiPromptbausteineService().UpdateAiPromptbausteine(aiPromptbausteinDCs);
|
||||
|
||||
public void DeleteAiPromptbausteine(Dictionary<long, long> oid2version)
|
||||
=> GetAiPromptbausteineService().DeleteAiPromptbausteine(oid2version);
|
||||
|
||||
private AiPromptbausteineService GetAiPromptbausteineService()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
return new AiPromptbausteineService();
|
||||
|
||||
//var plugin = PluginLoader.FindClass<AiPromptbausteineService>();
|
||||
//return plugin;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Functions
|
||||
public AiFunctionDocResponse ExecuteAiFunctionServiceRecordDocumentation(AiFunctionDocRequest request)
|
||||
=> GetAiFunctionService().ExecuteAiFunctionServiceRecordDocumentation(request);
|
||||
|
||||
private AiFunctionService GetAiFunctionService()
|
||||
{
|
||||
return new AiFunctionService();
|
||||
|
||||
//var plugin = PluginLoader.FindClass<AiPromptbausteineService>();
|
||||
//return plugin;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -635,12 +635,12 @@ namespace BS.Shared
|
||||
AiModuleView2 = 201004,
|
||||
AiModuleViewSetting = 201005,
|
||||
AiModuleChatClone = 201006,
|
||||
|
||||
AiModulePromptbausteineView = 201007,
|
||||
AiModulePromptbausteineAdd = 201008,
|
||||
AiModulePromptbausteineEdit = 201009,
|
||||
AiModulePromptbausteineRemove = 201010,
|
||||
AiModulePromptbausteineSeeAll = 201011,
|
||||
|
||||
}
|
||||
|
||||
public enum PersonType
|
||||
|
||||
@@ -19,4 +19,11 @@ namespace BS.Shared.DataContracts.Feature.AI.Functions.ServiceRecords
|
||||
[DataMember]
|
||||
public string Dokumentation { get; set; }
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
public class AiFunctionDocResponse
|
||||
{
|
||||
[DataMember]
|
||||
public string Result { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@
|
||||
<Compile Include="DataContracts\AddressRouteDC.cs" />
|
||||
<Compile Include="DataContracts\ClientPartials\IMoKSearchableDC.cs" />
|
||||
<Compile Include="DataContracts\CustomerVermittlungArbeitDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\Functions\ServiceRecords\AiFunctionDocRequest.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\Functions\ServiceRecords\AiFunctionDoc.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvClientRequestDC.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvClientSumRequestJson.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvClientSumResponseJson.cs" />
|
||||
|
||||
Reference in New Issue
Block a user