Klonen von Nachrichten werden kopiert und nicht überschrieben
This commit is contained in:
@@ -11,6 +11,7 @@ using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using BS.Shared.DataContracts.MikePHPContracts;
|
||||
using DevExpress.Drawing.Internal.Interop;
|
||||
using DevExpress.Entity.Model.Metadata;
|
||||
using DevExpress.XtraCharts.Native;
|
||||
using Newtonsoft.Json;
|
||||
@@ -22,6 +23,7 @@ using System.ServiceModel;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
@@ -130,8 +132,16 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
foreach (var msg in parent_conv.Messages)
|
||||
{
|
||||
clone_conv.Messages.Add(msg);
|
||||
msg.AiConversation = clone_conv;
|
||||
var clone_msg = new AiConversationMessage();
|
||||
|
||||
clone_msg.Created = msg.Created;
|
||||
clone_msg.Message = msg.Message;
|
||||
clone_msg.Role = msg.Role;
|
||||
clone_msg.Duration = msg.Duration;
|
||||
clone_msg.ModelName = msg.ModelName;
|
||||
|
||||
clone_conv.Messages.Add(clone_msg);
|
||||
clone_msg.AiConversation = clone_conv;
|
||||
|
||||
if (msg.Oid == last_message_oid)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user