AI-Studio/app/MindWork AI Studio/Chat/ContentImage.cs

48 lines
1.2 KiB
C#
Raw Normal View History

using System.Text.Json.Serialization;
2024-05-04 09:11:09 +00:00
using AIStudio.Provider;
using AIStudio.Settings;
namespace AIStudio.Chat;
/// <summary>
/// Represents an image inside the chat.
/// </summary>
public sealed class ContentImage : IContent
{
#region Implementation of IContent
/// <inheritdoc />
[JsonIgnore]
2024-05-04 09:11:09 +00:00
public bool InitialRemoteWait { get; set; } = false;
/// <inheritdoc />
[JsonIgnore]
2024-05-04 09:11:09 +00:00
public bool IsStreaming { get; set; } = false;
/// <inheritdoc />
[JsonIgnore]
2024-05-04 09:11:09 +00:00
public Func<Task> StreamingDone { get; set; } = () => Task.CompletedTask;
/// <inheritdoc />
[JsonIgnore]
2024-05-04 09:11:09 +00:00
public Func<Task> StreamingEvent { get; set; } = () => Task.CompletedTask;
/// <inheritdoc />
2024-09-01 18:10:03 +00:00
public Task CreateFromProviderAsync(IProvider provider, SettingsManager settings, Model chatModel, ChatThread chatChatThread, CancellationToken token = default)
2024-05-04 09:11:09 +00:00
{
throw new NotImplementedException();
}
#endregion
/// <summary>
/// The URL of the image.
/// </summary>
public string URL { get; set; } = string.Empty;
/// <summary>
/// The local path of the image.
/// </summary>
public string LocalPath { get; set; } = string.Empty;
}