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 GetAiModels() => GetAiService().GetAiModels(); public IEnumerable 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(); return plugin; } public IEnumerable GetAiPromptbausteine() { var dc = new AiPromptbausteinDC(); dc.Oid = 1; dc.IsParent = false; dc.Version = 1; dc.Text = "Beispiel"; return new List { dc }; } public IEnumerable CreateAiPromptbausteine(IEnumerable aiPromptbausteinDC) { throw new System.NotImplementedException(); } public Dictionary UpdateAiPromptbausteine(IEnumerable aiPromptbausteinDCs) { throw new System.NotImplementedException(); } public void DeleteAiPromptbausteine(Dictionary oid2version) { throw new System.NotImplementedException(); } } }