AI-Studio/app/MindWork AI Studio/Chat/ChatThread.cs
2024-05-04 11:11:09 +02:00

31 lines
1.2 KiB
C#

namespace AIStudio.Chat;
/// <summary>
/// Data structure for a chat thread.
/// </summary>
/// <param name="name">The name of the chat thread.</param>
/// <param name="seed">The seed for the chat thread. Some providers use this to generate deterministic results.</param>
/// <param name="systemPrompt">The system prompt for the chat thread.</param>
/// <param name="blocks">The content blocks of the chat thread.</param>
public sealed class ChatThread(string name, int seed, string systemPrompt, IEnumerable<ContentBlock> blocks)
{
/// <summary>
/// The name of the chat thread. Usually generated by an AI model or manually edited by the user.
/// </summary>
public string Name { get; set; } = name;
/// <summary>
/// The seed for the chat thread. Some providers use this to generate deterministic results.
/// </summary>
public int Seed { get; set; } = seed;
/// <summary>
/// The current system prompt for the chat thread.
/// </summary>
public string SystemPrompt { get; set; } = systemPrompt;
/// <summary>
/// The content blocks of the chat thread.
/// </summary>
public List<ContentBlock> Blocks { get; init; } = blocks.ToList();
}