namespace AIStudio.Chat.Embedded; /// /// A message for an embedded chat, together with what the assistant decides about the request it starts. /// public sealed record EmbeddedChatRequest { /// /// The provider which answers. /// public required AIStudio.Settings.Provider Provider { get; init; } /// /// The message, with its attachments. The chat stores it as it is. /// public required ContentText Message { get; init; } /// /// Whether the user does not see the message, e.g., a request which lets the model open a conversation. /// public bool IsHidden { get; init; } /// /// Whether messages to the user leave out which provider and which model answer, see IProvider.HidesIdentity. /// public bool HidesModelIdentity { get; init; } /// /// Readies the chat for the request before the message goes in: its system prompt, profile, tools, and data /// sources, which a chat partly does not store. Returns false to send nothing; it tells the user why itself. /// public Func> PrepareAsync { get; init; } = _ => Task.FromResult(true); /// /// Gets the chat which the request sends, e.g., with images which the stored chat never holds. The chat itself /// by default. /// public Func ThreadForRequest { get; init; } = thread => thread; }