Added chat UI

This commit is contained in:
tsommer committed 2024-05-04 11:11:09 +02:00
1 parent 862ec9c36a
commit bb663d1b73
12 files changed
+631 -20

No files matched your search

@@ -0,0 +1,30 @@
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>
/// <param name="time">Time when the content block was created.</param>
/// <param name="type">Type of the content block, e.g., text, image, voice, etc.</param>
/// <param name="content">The content of the block.</param>
public class ContentBlock(DateTimeOffset time, ContentType type, IContent content)
{
/// <summary>
/// Time when the content block was created.
/// </summary>
public DateTimeOffset Time => time;
/// <summary>
/// Type of the content block, e.g., text, image, voice, etc.
/// </summary>
public ContentType ContentType => type;
/// <summary>
/// The content of the block.
/// </summary>
public IContent Content => content;
/// <summary>
/// The role of the content block in the chat thread, e.g., user, AI, etc.
/// </summary>
public ChatRole Role { get; init; } = ChatRole.NONE;
}