namespace AIStudio.Chat.Embedded; /// /// What an assistant decided while it readied a request of an embedded chat: whether the request goes out, and what it /// carries beside the stored chat. /// /// /// Both are decided together, since what a request carries may only be known once it was readied, e.g., which images /// of the assistant fit beside the system prompt. A ready preparation which carries more starts from READY: /// EmbeddedChatPreparation.READY with { ThreadForRequest = … }. /// public sealed record EmbeddedChatPreparation { /// /// The request goes out with the chat as it is. /// public static readonly EmbeddedChatPreparation READY = new() { IsReady = true }; /// /// The request does not go out; whoever readied it told the user why. /// public static readonly EmbeddedChatPreparation REFUSED = new() { IsReady = false }; /// /// Gets whether the request goes out. /// public bool IsReady { get; private init; } /// /// Gets the chat which the request sends, e.g., with images which the stored chat never holds. The chat itself by /// default. /// /// /// Called once the message and the block of the answer are in the chat, so that the request carries both. Change a /// copy only: the chat is stored as it is. /// public Func ThreadForRequest { get; init; } = thread => thread; }