This commit is contained in:
Karrot0
2024-11-10 21:08:06 -05:00
14 changed files with 238 additions and 115 deletions

View File

@@ -100,9 +100,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) {