|
1 | 1 | <?php |
2 | 2 |
|
3 | | -use Cognesy\Polyglot\LLM\Enums\LLMProviderType; |
4 | 3 | use Cognesy\Utils\Env; |
5 | 4 |
|
6 | 5 | return [ |
|
16 | 15 |
|
17 | 16 | 'connections' => [ |
18 | 17 | 'a21' => [ |
19 | | - 'providerType' => LLMProviderType::A21->value, |
| 18 | + 'providerType' => 'a21', |
20 | 19 | 'apiUrl' => 'https://api.ai21.com/studio/v1', |
21 | 20 | 'apiKey' => Env::get('A21_API_KEY', ''), |
22 | 21 | 'endpoint' => '/chat/completions', |
|
26 | 25 | 'maxOutputLength' => 4096, |
27 | 26 | ], |
28 | 27 | 'anthropic' => [ |
29 | | - 'providerType' => LLMProviderType::Anthropic->value, |
| 28 | + 'providerType' => 'anthropic', |
30 | 29 | 'apiUrl' => 'https://api.anthropic.com/v1', |
31 | 30 | 'apiKey' => Env::get('ANTHROPIC_API_KEY', ''), |
32 | 31 | 'endpoint' => '/messages', |
|
40 | 39 | 'maxOutputLength' => 8192, |
41 | 40 | ], |
42 | 41 | 'azure' => [ |
43 | | - 'providerType' => LLMProviderType::Azure->value, |
| 42 | + 'providerType' => 'azure', |
44 | 43 | 'apiUrl' => 'https://{resourceName}.openai.azure.com/openai/deployments/{deploymentId}', |
45 | 44 | 'apiKey' => Env::get('AZURE_OPENAI_API_KEY', ''), |
46 | 45 | 'endpoint' => '/chat/completions', |
|
55 | 54 | 'maxOutputLength' => 16384, |
56 | 55 | ], |
57 | 56 | 'cerebras' => [ |
58 | | - 'providerType' => LLMProviderType::Cerebras->value, |
| 57 | + 'providerType' => 'cerebras', |
59 | 58 | 'apiUrl' => 'https://api.cerebras.ai/v1', |
60 | 59 | 'apiKey' => Env::get('CEREBRAS_API_KEY', ''), |
61 | 60 | 'endpoint' => '/chat/completions', |
|
65 | 64 | 'maxOutputLength' => 2048, |
66 | 65 | ], |
67 | 66 | 'cohere1' => [ |
68 | | - 'providerType' => LLMProviderType::CohereV1->value, |
| 67 | + 'providerType' => 'cohere1', |
69 | 68 | 'apiUrl' => 'https://api.cohere.ai/v1', |
70 | 69 | 'apiKey' => Env::get('COHERE_API_KEY', ''), |
71 | 70 | 'endpoint' => '/chat', |
|
75 | 74 | 'maxOutputLength' => 4096, |
76 | 75 | ], |
77 | 76 | 'cohere2' => [ |
78 | | - 'providerType' => LLMProviderType::CohereV2->value, |
| 77 | + 'providerType' => 'cohere2', |
79 | 78 | 'apiUrl' => 'https://api.cohere.ai/v2', |
80 | 79 | 'apiKey' => Env::get('COHERE_API_KEY', ''), |
81 | 80 | 'endpoint' => '/chat', |
|
85 | 84 | 'maxOutputLength' => 4096, |
86 | 85 | ], |
87 | 86 | 'deepseek' => [ |
88 | | - 'providerType' => LLMProviderType::DeepSeek->value, |
| 87 | + 'providerType' => 'deepseek', |
89 | 88 | 'apiUrl' => 'https://api.deepseek.com', |
90 | 89 | 'apiKey' => Env::get('DEEPSEEK_API_KEY', ''), |
91 | 90 | 'endpoint' => '/chat/completions', |
|
95 | 94 | 'maxOutputLength' => 8192, |
96 | 95 | ], |
97 | 96 | 'deepseek-r' => [ |
98 | | - 'providerType' => LLMProviderType::DeepSeek->value, |
| 97 | + 'providerType' => 'deepseek', |
99 | 98 | 'apiUrl' => 'https://api.deepseek.com', |
100 | 99 | 'apiKey' => Env::get('DEEPSEEK_API_KEY', ''), |
101 | 100 | 'endpoint' => '/chat/completions', |
|
105 | 104 | 'maxOutputLength' => 8192, |
106 | 105 | ], |
107 | 106 | 'fireworks' => [ |
108 | | - 'providerType' => LLMProviderType::Fireworks->value, |
| 107 | + 'providerType' => 'fireworks', |
109 | 108 | 'apiUrl' => 'https://api.fireworks.ai/inference/v1', |
110 | 109 | 'apiKey' => Env::get('FIREWORKS_API_KEY', ''), |
111 | 110 | 'endpoint' => '/chat/completions', |
|
115 | 114 | 'maxOutputLength' => 4096, |
116 | 115 | ], |
117 | 116 | 'gemini' => [ |
118 | | - 'providerType' => LLMProviderType::Gemini->value, |
| 117 | + 'providerType' => 'gemini', |
119 | 118 | 'apiUrl' => 'https://generativelanguage.googleapis.com/v1beta', |
120 | 119 | 'apiKey' => Env::get('GEMINI_API_KEY', ''), |
121 | 120 | 'endpoint' => '/models/{model}:generateContent', |
|
125 | 124 | 'maxOutputLength' => 8192, |
126 | 125 | ], |
127 | 126 | 'gemini-oai' => [ |
128 | | - 'providerType' => LLMProviderType::GeminiOAI->value, |
| 127 | + 'providerType' => 'gemini-oai', |
129 | 128 | 'apiUrl' => 'https://generativelanguage.googleapis.com/v1beta/openai', |
130 | 129 | 'apiKey' => Env::get('GEMINI_API_KEY', ''), |
131 | 130 | 'endpoint' => '/chat/completions', |
|
135 | 134 | 'maxOutputLength' => 8192, |
136 | 135 | ], |
137 | 136 | 'groq' => [ |
138 | | - 'providerType' => LLMProviderType::Groq->value, |
| 137 | + 'providerType' => 'groq', |
139 | 138 | 'apiUrl' => 'https://api.groq.com/openai/v1', |
140 | 139 | 'apiKey' => Env::get('GROQ_API_KEY', ''), |
141 | 140 | 'endpoint' => '/chat/completions', |
|
145 | 144 | 'maxOutputLength' => 2048, |
146 | 145 | ], |
147 | 146 | 'minimaxi' => [ |
148 | | - 'providerType' => LLMProviderType::Minimaxi->value, |
| 147 | + 'providerType' => 'minimaxi', |
149 | 148 | 'apiUrl' => 'https://api.minimaxi.chat/v1', |
150 | 149 | 'apiKey' => Env::get('MINIMAXI_API_KEY', ''), |
151 | 150 | 'endpoint' => '/text/chatcompletion_v2', |
|
155 | 154 | 'maxOutputLength' => 4096, |
156 | 155 | ], |
157 | 156 | 'mistral' => [ |
158 | | - 'providerType' => LLMProviderType::Mistral->value, |
| 157 | + 'providerType' => 'mistral', |
159 | 158 | 'apiUrl' => 'https://api.mistral.ai/v1', |
160 | 159 | 'apiKey' => Env::get('MISTRAL_API_KEY', ''), |
161 | 160 | 'endpoint' => '/chat/completions', |
|
165 | 164 | 'maxOutputLength' => 4096, |
166 | 165 | ], |
167 | 166 | 'moonshot-kimi' => [ |
168 | | - 'providerType' => LLMProviderType::Moonshot->value, |
| 167 | + 'providerType' => 'moonshot', |
169 | 168 | 'apiUrl' => 'https://api.moonshot.cn/v1', |
170 | 169 | 'apiKey' => Env::get('MOONSHOT_API_KEY', ''), |
171 | 170 | 'endpoint' => '/chat/completions', |
|
175 | 174 | 'maxOutputLength' => 4096, |
176 | 175 | ], |
177 | 176 | 'ollama' => [ |
178 | | - 'providerType' => LLMProviderType::Ollama->value, |
| 177 | + 'providerType' => 'ollama', |
179 | 178 | 'apiUrl' => 'http://localhost:11434/v1', |
180 | 179 | 'apiKey' => Env::get('OLLAMA_API_KEY', ''), |
181 | 180 | 'endpoint' => '/chat/completions', |
|
186 | 185 | 'maxOutputLength' => 8192, |
187 | 186 | ], |
188 | 187 | 'openai' => [ |
189 | | - 'providerType' => LLMProviderType::OpenAI->value, |
| 188 | + 'providerType' => 'openai', |
190 | 189 | 'apiUrl' => 'https://api.openai.com/v1', |
191 | 190 | 'apiKey' => Env::get('OPENAI_API_KEY', ''), |
192 | 191 | 'endpoint' => '/chat/completions', |
|
200 | 199 | 'maxOutputLength' => 16384, |
201 | 200 | ], |
202 | 201 | 'openrouter' => [ |
203 | | - 'providerType' => LLMProviderType::OpenRouter->value, |
| 202 | + 'providerType' => 'openrouter', |
204 | 203 | 'apiUrl' => 'https://openrouter.ai/api/v1', |
205 | 204 | 'apiKey' => Env::get('OPENROUTER_API_KEY', ''), |
206 | 205 | 'endpoint' => '/chat/completions', |
|
210 | 209 | 'maxOutputLength' => 8192, |
211 | 210 | ], |
212 | 211 | 'perplexity' => [ |
213 | | - 'providerType' => LLMProviderType::Perplexity->value, |
| 212 | + 'providerType' => 'perplexity', |
214 | 213 | 'apiUrl' => 'https://api.perplexity.ai', |
215 | 214 | 'apiKey' => Env::get('PERPLEXITY_API_KEY', ''), |
216 | 215 | 'endpoint' => '/chat/completions', |
|
220 | 219 | 'maxOutputLength' => 2048, |
221 | 220 | ], |
222 | 221 | 'sambanova' => [ |
223 | | - 'providerType' => LLMProviderType::SambaNova->value, |
| 222 | + 'providerType' => 'sambanova', |
224 | 223 | 'apiUrl' => 'https://api.sambanova.ai/v1', |
225 | 224 | 'apiKey' => Env::get('SAMBANOVA_API_KEY', ''), |
226 | 225 | 'endpoint' => '/chat/completions', |
|
230 | 229 | 'maxOutputLength' => 2048, |
231 | 230 | ], |
232 | 231 | 'together' => [ |
233 | | - 'providerType' => LLMProviderType::Together->value, |
| 232 | + 'providerType' => 'together', |
234 | 233 | 'apiUrl' => 'https://api.together.xyz/v1', |
235 | 234 | 'apiKey' => Env::get('TOGETHER_API_KEY', ''), |
236 | 235 | 'endpoint' => '/chat/completions', |
|
240 | 239 | 'maxOutputLength' => 4096, |
241 | 240 | ], |
242 | 241 | 'xai' => [ |
243 | | - 'providerType' => LLMProviderType::XAi->value, |
| 242 | + 'providerType' => 'xai', |
244 | 243 | 'apiUrl' => 'https://api.x.ai/v1', |
245 | 244 | 'apiKey' => Env::get('XAI_API_KEY', ''), |
246 | 245 | 'endpoint' => '/chat/completions', |
|
0 commit comments