Fixed automatic next role selection

This commit is contained in:
Thorsten Sommer 2025-05-24 18:33:57 +02:00
parent b99edf6dd4
commit 935b5c3417
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -120,7 +120,7 @@ public partial class ChatTemplateDialog : MSGComponentBase
{ {
var newEntry = new ContentBlock var newEntry = new ContentBlock
{ {
Role = ChatRole.USER, // Default to User Role = this.dataExampleConversation.Count is 0 ? ChatRole.USER : this.dataExampleConversation.Last().Role.SelectNextRoleForTemplate(),
Content = new ContentText(), Content = new ContentText(),
ContentType = ContentType.TEXT, ContentType = ContentType.TEXT,
HideFromUser = true, HideFromUser = true,
@ -136,7 +136,7 @@ public partial class ChatTemplateDialog : MSGComponentBase
// Create new entry with a valid role // Create new entry with a valid role
var newEntry = new ContentBlock var newEntry = new ContentBlock
{ {
Role = ChatRole.USER, // Default to User Role = this.dataExampleConversation.Count is 0 ? ChatRole.USER : this.dataExampleConversation.Last().Role.SelectNextRoleForTemplate(),
Content = new ContentText(), Content = new ContentText(),
ContentType = ContentType.TEXT, ContentType = ContentType.TEXT,
HideFromUser = true, HideFromUser = true,