Added chat templates (#474)

This commit is contained in:
Peer Schütt authored and GitHub committed 2025-05-24 12:27:00 +02:00
1 parent 35eebc08a5
commit df062ae6e6
27 files changed
+799 -21

No files matched your search

+14 -2
View File
@@ -18,15 +18,27 @@ public class ContentBlock
/// <summary>
/// The content of the block.
/// </summary>
public IContent? Content { get; init; }
public IContent? Content { get; set; }
/// <summary>
/// The role of the content block in the chat thread, e.g., user, AI, etc.
/// </summary>
public ChatRole Role { get; init; } = ChatRole.NONE;
public ChatRole Role { get; set; } = ChatRole.NONE;
/// <summary>
/// Should the content block be hidden from the user?
/// </summary>
public bool HideFromUser { get; set; }
public ContentBlock DeepClone()
{
return new()
{
Time = this.Time,
ContentType = this.ContentType,
Content = this.Content?.DeepClone(),
Role = this.Role,
HideFromUser = this.HideFromUser,
};
}
}