-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathLLMApiRegistry.cs
More file actions
30 lines (26 loc) · 1.33 KB
/
LLMApiRegistry.cs
File metadata and controls
30 lines (26 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using MaIN.Domain.Configuration;
namespace MaIN.Domain.Models.Concrete;
public static class LLMApiRegistry
{
public static readonly LLMApiRegistryEntry OpenAi = new("OpenAI", "OPENAI_API_KEY");
public static readonly LLMApiRegistryEntry Gemini = new("Gemini", "GEMINI_API_KEY");
public static readonly LLMApiRegistryEntry Deepseek = new("Deepseek", "DEEPSEEK_API_KEY");
public static readonly LLMApiRegistryEntry Groq = new("GroqCloud", "GROQ_API_KEY");
public static readonly LLMApiRegistryEntry Anthropic = new("Anthropic", "ANTHROPIC_API_KEY");
public static readonly LLMApiRegistryEntry Xai = new("Xai", "XAI_API_KEY");
public static readonly LLMApiRegistryEntry Ollama = new("Ollama", "OLLAMA_API_KEY");
public static readonly LLMApiRegistryEntry Vertex = new("Vertex", "GOOGLE_APPLICATION_CREDENTIALS");
public static LLMApiRegistryEntry? GetEntry(BackendType backendType) => backendType switch
{
BackendType.OpenAi => OpenAi,
BackendType.Gemini => Gemini,
BackendType.DeepSeek => Deepseek,
BackendType.GroqCloud => Groq,
BackendType.Anthropic => Anthropic,
BackendType.Xai => Xai,
BackendType.Ollama => Ollama,
BackendType.Vertex => Vertex,
_ => null
};
}
public record LLMApiRegistryEntry(string ApiName, string ApiKeyEnvName);