fix log order
This commit is contained in:
parent
bdcf8c5a2a
commit
4ca70dfdf0
|
|
@ -96,7 +96,6 @@ public class RoleDialogModel : ITrackableMessage
|
|||
Role = role;
|
||||
Content = text;
|
||||
MessageId = Guid.NewGuid().ToString();
|
||||
CreatedAt = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
|||
|
|
@ -171,8 +171,10 @@ public class ConversationController : ControllerBase
|
|||
var conv = _services.GetRequiredService<IConversationService>();
|
||||
var inputMsg = new RoleDialogModel(AgentRole.User, input.Text)
|
||||
{
|
||||
Files = input.Files
|
||||
Files = input.Files,
|
||||
CreatedAt = DateTime.UtcNow
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(input.TruncateMessageId))
|
||||
{
|
||||
await conv.TruncateConversation(conversationId, input.TruncateMessageId, inputMsg.MessageId);
|
||||
|
|
@ -215,8 +217,10 @@ public class ConversationController : ControllerBase
|
|||
var conv = _services.GetRequiredService<IConversationService>();
|
||||
var inputMsg = new RoleDialogModel(AgentRole.User, input.Text)
|
||||
{
|
||||
Files = input.Files
|
||||
Files = input.Files,
|
||||
CreatedAt = DateTime.UtcNow
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(input.TruncateMessageId))
|
||||
{
|
||||
await conv.TruncateConversation(conversationId, input.TruncateMessageId, inputMsg.MessageId);
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ public class StreamingLogHook : ConversationHookBase, IContentGeneratingHook, IR
|
|||
Role = input.Message.Role,
|
||||
Content = input.Log,
|
||||
Source = input.Source,
|
||||
CreateTime = input.Message.CreatedAt
|
||||
CreateTime = DateTime.UtcNow
|
||||
};
|
||||
|
||||
var json = JsonSerializer.Serialize(output, _options.JsonSerializerOptions);
|
||||
|
|
@ -439,7 +439,7 @@ public class StreamingLogHook : ConversationHookBase, IContentGeneratingHook, IR
|
|||
ConversationId = conversationId,
|
||||
MessageId = message.MessageId,
|
||||
States = states,
|
||||
CreateTime = message.CreatedAt
|
||||
CreateTime = DateTime.UtcNow
|
||||
};
|
||||
|
||||
var convSettings = _services.GetRequiredService<ConversationSetting>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue