Merge branch 'main' into main

This commit is contained in:
Eduard Ruzga
2024-11-10 14:55:17 +02:00
committed by GitHub
13 changed files with 230 additions and 71 deletions

View File

@@ -99,9 +99,8 @@ export function getXAIModel(apiKey: string, model: string) {
return openai(model);
}
export function getModel(provider: string, model: string, env: Env) {
const apiKey = getAPIKey(env, provider);
export function getModel(provider: string, model: string, env: Env, apiKeys?: Record<string, string>) {
const apiKey = getAPIKey(env, provider, apiKeys);
const baseURL = getBaseURL(env, provider);
switch (provider) {