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

26 lines
512 B
C#
Raw Normal View History

2024-04-20 15:06:50 +00:00
using AIStudio.Provider.OpenAI;
namespace AIStudio.Provider;
public enum Providers
{
NONE,
OPEN_AI,
}
public static class ExtensionsProvider
{
public static string ToName(this Providers provider) => provider switch
{
Providers.OPEN_AI => "OpenAI",
_ => "Unknown",
};
public static IProvider CreateProvider(this Providers provider) => provider switch
{
Providers.OPEN_AI => new ProviderOpenAI(),
_ => new NoProvider(),
};
}