AI-Studio/app/MindWork AI Studio/Chat/ContentBlock.cs

32 lines
929 B
C#
Raw Normal View History

2024-05-04 09:11:09 +00:00
namespace AIStudio.Chat;
/// <summary>
/// A block of content in a chat thread. Might be any type of content, e.g., text, image, voice, etc.
/// </summary>
public class ContentBlock
2024-05-04 09:11:09 +00:00
{
/// <summary>
/// Time when the content block was created.
/// </summary>
public DateTimeOffset Time { get; init; }
2024-05-04 09:11:09 +00:00
/// <summary>
/// Type of the content block, e.g., text, image, voice, etc.
/// </summary>
public ContentType ContentType { get; init; } = ContentType.NONE;
2024-05-04 09:11:09 +00:00
/// <summary>
/// The content of the block.
/// </summary>
2024-10-28 14:41:00 +00:00
public IContent? Content { get; init; }
2024-05-04 09:11:09 +00:00
/// <summary>
/// The role of the content block in the chat thread, e.g., user, AI, etc.
/// </summary>
public ChatRole Role { get; init; } = ChatRole.NONE;
2024-10-28 14:41:00 +00:00
/// <summary>
/// Should the content block be hidden from the user?
/// </summary>
public bool HideFromUser { get; set; }
2024-05-04 09:11:09 +00:00
}