mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-13 00:21:37 +00:00
Rename ContentType to SubContentType for clarity & moved into the provider space
This commit is contained in:
parent
422791e8b9
commit
6a2d60740f
@ -8,5 +8,5 @@ public interface ISubContent
|
||||
/// <summary>
|
||||
/// The type of the sub-content.
|
||||
/// </summary>
|
||||
public ContentType Type { get; init; }
|
||||
public SubContentType Type { get; init; }
|
||||
}
|
||||
@ -3,9 +3,9 @@ namespace AIStudio.Provider.OpenAI;
|
||||
/// <summary>
|
||||
/// Image sub-content for multimodal messages.
|
||||
/// </summary>
|
||||
public record SubContentImageUrl(ContentType Type, string ImageUrl) : ISubContent
|
||||
public record SubContentImageUrl(SubContentType Type, string ImageUrl) : ISubContent
|
||||
{
|
||||
public SubContentImageUrl() : this(ContentType.IMAGE_URL, string.Empty)
|
||||
public SubContentImageUrl() : this(SubContentType.IMAGE_URL, string.Empty)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,9 @@ namespace AIStudio.Provider.OpenAI;
|
||||
/// <remarks>
|
||||
/// Right now, this is used only by OpenAI in its responses API.
|
||||
/// </remarks>
|
||||
public record SubContentInputImage(ContentType Type, string ImageUrl) : ISubContent
|
||||
public record SubContentInputImage(SubContentType Type, string ImageUrl) : ISubContent
|
||||
{
|
||||
public SubContentInputImage() : this(ContentType.INPUT_IMAGE, string.Empty)
|
||||
public SubContentInputImage() : this(SubContentType.INPUT_IMAGE, string.Empty)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,9 @@ namespace AIStudio.Provider.OpenAI;
|
||||
/// <remarks>
|
||||
/// Right now, this is used only by OpenAI in its responses API.
|
||||
/// </remarks>
|
||||
public record SubContentInputText(ContentType Type, string Text) : ISubContent
|
||||
public record SubContentInputText(SubContentType Type, string Text) : ISubContent
|
||||
{
|
||||
public SubContentInputText() : this(ContentType.INPUT_TEXT, string.Empty)
|
||||
public SubContentInputText() : this(SubContentType.INPUT_TEXT, string.Empty)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,9 @@ namespace AIStudio.Provider.OpenAI;
|
||||
/// <summary>
|
||||
/// Text sub-content for multimodal messages.
|
||||
/// </summary>
|
||||
public record SubContentText(ContentType Type, string Text) : ISubContent
|
||||
public record SubContentText(SubContentType Type, string Text) : ISubContent
|
||||
{
|
||||
public SubContentText() : this(ContentType.TEXT, string.Empty)
|
||||
public SubContentText() : this(SubContentType.TEXT, string.Empty)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,9 @@
|
||||
namespace AIStudio.Provider.OpenAI;
|
||||
namespace AIStudio.Provider;
|
||||
|
||||
/// <summary>
|
||||
/// Content types for OpenAI API interactions when using multimodal messages.
|
||||
/// Sub content types for OpenAI-compatible API interactions when using multimodal messages.
|
||||
/// </summary>
|
||||
public enum ContentType
|
||||
public enum SubContentType
|
||||
{
|
||||
/// <summary>
|
||||
/// Default type for user prompts in multimodal messages. This type is supported across all providers.
|
||||
@ -22,13 +22,18 @@ public enum ContentType
|
||||
/// </summary>
|
||||
INPUT_IMAGE,
|
||||
|
||||
/// <summary>
|
||||
/// Right now only supported by OpenAI (responses & chat completion API), Google (chat completions API), and Mistral (chat completions API).
|
||||
/// </summary>
|
||||
INPUT_AUDIO,
|
||||
|
||||
/// <summary>
|
||||
/// Default type for images in multimodal messages. This type is supported across all providers.
|
||||
/// </summary>
|
||||
IMAGE_URL,
|
||||
|
||||
/// <summary>
|
||||
/// The image type is used exclusively by Anthropic's messages API.
|
||||
/// </summary>
|
||||
IMAGE,
|
||||
|
||||
/// <summary>
|
||||
/// Right now only supported by OpenAI (responses & chat completion API), Google (chat completions API), and Mistral (chat completions API).
|
||||
/// </summary>
|
||||
INPUT_AUDIO,
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user