using System.Text.Json.Serialization;
using AIStudio.Provider;
namespace AIStudio.Chat;
///
/// Represents an image inside the chat.
///
public sealed class ContentImage : IContent, IImageSource
{
#region Implementation of IContent
///
[JsonIgnore]
public bool InitialRemoteWait { get; set; }
///
[JsonIgnore]
public bool IsStreaming { get; set; }
///
[JsonIgnore]
public Func StreamingDone { get; set; } = () => Task.CompletedTask;
///
[JsonIgnore]
public Func StreamingEvent { get; set; } = () => Task.CompletedTask;
///
public Task CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatChatThread, CancellationToken token = default)
{
throw new NotImplementedException();
}
///
public IContent DeepClone() => new ContentImage
{
Source = this.Source,
InitialRemoteWait = this.InitialRemoteWait,
IsStreaming = this.IsStreaming,
SourceType = this.SourceType,
};
#endregion
///
/// The type of the image source.
///
///
/// Is the image source a URL, a local file path, a base64 string, etc.?
///
public required ContentImageSource SourceType { get; init; }
///
/// The image source.
///
public required string Source { get; set; }
}