AI-Studio/app/MindWork AI Studio/Provider/Capability.cs

147 lines
4.9 KiB
C#
Raw Normal View History

2025-05-11 10:51:35 +00:00
namespace AIStudio.Provider;
/// <summary>
/// Represents the capabilities of an AI model.
/// </summary>
/// <remarks>
/// A set of capabilities is one value, not a collection: a model profile carries this enum as a
/// single field, and asking whether a capability is present is one bit test instead of a walk
/// through a list. That is why the members are powers of two.
///
/// The numeric values are an implementation detail and are never written anywhere. Overrides,
/// plugins, and the settings file all address a capability by its name, so the names are the part
/// which must not change. Removing a member would silently drop the override an organization wrote
/// for it, which is why the members we no longer hand out ourselves are still here.
///
/// Adding a member means adding the next free bit. Sixty-four of them fit; should they ever run
/// out, the answer is a second enum next to this one rather than a wider underlying type, because
/// widening changes the meaning of every value already written down.
/// </remarks>
[Flags]
public enum Capability : ulong
2025-05-11 10:51:35 +00:00
{
/// <summary>
/// No capabilities specified.
/// </summary>
NONE = 0,
2025-05-11 10:51:35 +00:00
/// <summary>
/// We don't know what the AI model can do.
/// </summary>
UNKNOWN = 1UL << 0,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform text input.
/// </summary>
TEXT_INPUT = 1UL << 1,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform audio input, such as music or sound.
/// </summary>
AUDIO_INPUT = 1UL << 2,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform one image input, such as one photo or drawing.
/// </summary>
SINGLE_IMAGE_INPUT = 1UL << 3,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform multiple images as input, such as multiple photos or drawings.
/// </summary>
MULTIPLE_IMAGE_INPUT = 1UL << 4,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform speech input.
/// </summary>
SPEECH_INPUT = 1UL << 5,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform video input, such as video files or streams.
/// </summary>
VIDEO_INPUT = 1UL << 6,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can generate text output.
/// </summary>
TEXT_OUTPUT = 1UL << 7,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can generate audio output, such as music or sound.
/// </summary>
AUDIO_OUTPUT = 1UL << 8,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can generate image output, such as photos or drawings.
/// </summary>
IMAGE_OUTPUT = 1UL << 9,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can generate speech output.
/// </summary>
SPEECH_OUTPUT = 1UL << 10,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can generate video output.
/// </summary>
VIDEO_OUTPUT = 1UL << 11,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform reasoning tasks. You can enable reasoning optionally, but it is disabled by default.
2025-05-11 10:51:35 +00:00
/// </summary>
/// <remarks>
/// Override vocabulary. A model profile states how a model reasons through its ReasoningSupport
/// field and never sets this flag, because the three reasoning flags can be combined into
/// answers no model can give. Asking a profile whether it has this capability always says no.
/// </remarks>
OPTIONAL_REASONING = 1UL << 12,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model always performs reasoning. There is no option to disable reasoning.
2025-05-11 10:51:35 +00:00
/// </summary>
/// <remarks>
/// Override vocabulary. A model profile states how a model reasons through its ReasoningSupport
/// field and never sets this flag, because the three reasoning flags can be combined into
/// answers no model can give. Asking a profile whether it has this capability always says no.
/// </remarks>
ALWAYS_REASONING = 1UL << 13,
/// <summary>
/// The AI model performs optional reasoning, but it is enabled by default.
/// </summary>
/// <remarks>
/// Override vocabulary. A model profile states how a model reasons through its ReasoningSupport
/// field and never sets this flag, because the three reasoning flags can be combined into
/// answers no model can give. Asking a profile whether it has this capability always says no.
/// </remarks>
REASONING_BY_DEFAULT = 1UL << 14,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can embed information or data.
/// </summary>
EMBEDDING = 1UL << 15,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform in real-time.
/// </summary>
REALTIME = 1UL << 16,
2025-05-11 10:51:35 +00:00
/// <summary>
/// The AI model can perform function calling, such as invoking APIs or executing functions.
/// </summary>
FUNCTION_CALLING = 1UL << 17,
2025-09-03 08:08:04 +00:00
/// <summary>
/// The AI model can perform web search to retrieve information from the internet.
/// </summary>
WEB_SEARCH = 1UL << 18,
2025-09-03 08:08:04 +00:00
/// <summary>
/// The AI model is used via the Chat Completion API.
/// </summary>
CHAT_COMPLETION_API = 1UL << 19,
2025-09-03 08:08:04 +00:00
/// <summary>
/// The AI model is used via the Responses API.
/// </summary>
RESPONSES_API = 1UL << 20,
2025-05-11 10:51:35 +00:00
}