diff --git a/Service/Plugins/AiService2.cs b/Service/Plugins/AiService2.cs index c7ccbf250..e3cce480f 100644 --- a/Service/Plugins/AiService2.cs +++ b/Service/Plugins/AiService2.cs @@ -124,6 +124,8 @@ namespace BeWo.Service.Plugins var conv = createAiConversation(conversation.UIContext, conversation.ContextBeWoObjects, modell_oid, config.Context_Type); + DAOFactory.GenericDAO.Insert(conv); + var conv_dc = MapperFactory.AiConversation.MapToNewDC(conv); return conv_dc; @@ -136,6 +138,8 @@ namespace BeWo.Service.Plugins var new_messages = sendNewMessage(conv, message, config); + DAOFactory.GenericDAO.Insert(conv); + var conv_dc = MapperFactory.AiConversation.MapToNewDC(conv); return conv_dc; @@ -287,8 +291,6 @@ namespace BeWo.Service.Plugins conv.Messages.Add(msg); - DAOFactory.GenericDAO.Insert(conv); - return conv; }