-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLLmFactory.cs
More file actions
42 lines (39 loc) · 1.49 KB
/
LLmFactory.cs
File metadata and controls
42 lines (39 loc) · 1.49 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
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright (c) 2026 Yvens R Serpa [https://github.com/YvensFaos/]
*
* This work is licensed under the Creative Commons Attribution 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
* or see the LICENSE file in the root directory of this repository.
*/
using System;
using FALLA.Implementation;
namespace FALLA
{
public static class LLmFactory
{
public static BaseLlm CreateLlm(LlmType type, string apiKey)
{
return type switch
{
LlmType.Gemini => new GeminiLlm(apiKey),
LlmType.Mistral => new MistralLlm(apiKey),
LlmType.DeepSeek => new DeepSeekLlm(apiKey),
LlmType.Claude => new ClaudeLlm(apiKey),
LlmType.GPT => new GptLlm(apiKey),
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
}
public static BaseLlm CreateLlm(LlmType type, string apiKey, string model)
{
return type switch
{
LlmType.Gemini => new GeminiLlm(apiKey, model),
LlmType.Mistral => new MistralLlm(apiKey, model),
LlmType.DeepSeek => new DeepSeekLlm(apiKey, model),
LlmType.Claude => new ClaudeLlm(apiKey, model),
LlmType.GPT => new GptLlm(apiKey, model),
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
}
}
}