mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 22:41:36 +00:00
Add sub-content image support with interfaces and types for Anthropic
This commit is contained in:
parent
6a2d60740f
commit
80332f1fb1
@ -0,0 +1,9 @@
|
||||
namespace AIStudio.Provider.Anthropic;
|
||||
|
||||
public interface ISubContentImageSource
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of the sub-content image.
|
||||
/// </summary>
|
||||
public SubContentImageType Type { get; }
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
namespace AIStudio.Provider.Anthropic;
|
||||
|
||||
public record SubContentBase64Image : ISubContentImageSource
|
||||
{
|
||||
public SubContentImageType Type => SubContentImageType.BASE64;
|
||||
|
||||
public string MediaType { get; init; } = string.Empty;
|
||||
|
||||
public string Data { get; init; } = string.Empty;
|
||||
}
|
||||
10
app/MindWork AI Studio/Provider/Anthropic/SubContentImage.cs
Normal file
10
app/MindWork AI Studio/Provider/Anthropic/SubContentImage.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using AIStudio.Provider.OpenAI;
|
||||
|
||||
namespace AIStudio.Provider.Anthropic;
|
||||
|
||||
public record SubContentImage(SubContentType Type, ISubContentImageSource Source) : ISubContent
|
||||
{
|
||||
public SubContentImage() : this(SubContentType.IMAGE, new SubContentImageUrl())
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
namespace AIStudio.Provider.Anthropic;
|
||||
|
||||
public enum SubContentImageType
|
||||
{
|
||||
URL,
|
||||
BASE64
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
namespace AIStudio.Provider.Anthropic;
|
||||
|
||||
public record SubContentImageUrl : ISubContentImageSource
|
||||
{
|
||||
public SubContentImageType Type => SubContentImageType.URL;
|
||||
|
||||
public string Url { get; init; } = string.Empty;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user