78 lines
2.6 KiB
C#
78 lines
2.6 KiB
C#
using BeWo.Data.Access;
|
|
using BeWo.Service.Plugins;
|
|
using BeWo.Service.ServiceContracts;
|
|
using BS.Shared;
|
|
using BS.Shared.DataContracts;
|
|
using BS.Shared.DataContracts.Feature.AI;
|
|
using System.Collections.Generic;
|
|
using System.ServiceModel;
|
|
|
|
namespace BeWo.Service.ServiceImplementations
|
|
{
|
|
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
|
public class AiEnhancedServiceImp : IAiEnhancedService
|
|
{
|
|
public AiConfigDC GetAiConfig()
|
|
=> GetAiService().GetAiConfig();
|
|
|
|
public AiConfigDC UpdateAiConfig(AiConfigDC toUpdate)
|
|
=> GetAiService().UpdateAiConfig(toUpdate);
|
|
|
|
public IEnumerable<AiModelDC> GetAiModels()
|
|
=> GetAiService().GetAiModels();
|
|
|
|
public IEnumerable<AiConversationDC> GetAiConversations(AiContextType uicontext, long? oid)
|
|
=> GetAiService().GetAiConversations(uicontext, oid);
|
|
|
|
public AiConversationDC CreateAiConversation(AiConversationDC conversation, long modell_oid)
|
|
=> GetAiService().CreateAiConversation(conversation, modell_oid);
|
|
public AiConversationDC CreateAiConversationWithMessage(AiConversationDC conversation, long modell_oid, string message)
|
|
=> GetAiService().CreateAiConversationWithMessage(conversation, modell_oid, message);
|
|
|
|
public AiConversationDC CloneAiConversation(long conversation_oid, long? last_message_oid)
|
|
=> GetAiService().CloneAiConversation(conversation_oid, last_message_oid);
|
|
|
|
public long UpdateAiConversationDisplayname(long oid, long version, string displayname)
|
|
=> GetAiService().UpdateAiConversationDisplayname(oid, version, displayname);
|
|
|
|
public void DeleteAiConversation(long conversation_oid)
|
|
=> GetAiService().DeleteAiConversation(conversation_oid);
|
|
|
|
public AiConversationMessageDC[] SendNewMessage(long conversation, string message)
|
|
=> GetAiService().SendNewMessage(conversation, message);
|
|
|
|
private AiService2 GetAiService()
|
|
{
|
|
var plugin = PluginLoader.FindClass<AiService2>();
|
|
return plugin;
|
|
}
|
|
|
|
public IEnumerable<AiPromptbausteinDC> GetAiPromptbausteine()
|
|
{
|
|
var dc = new AiPromptbausteinDC();
|
|
|
|
dc.Oid = 1;
|
|
dc.IsParent = false;
|
|
dc.Version = 1;
|
|
dc.Text = "Beispiel";
|
|
|
|
return new List<AiPromptbausteinDC> { dc };
|
|
}
|
|
|
|
public IEnumerable<AiPromptbausteinDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDC)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDCs)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
public void DeleteAiPromptbausteine(Dictionary<long, long> oid2version)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
}
|
|
}
|