feat(ollama): add ability to provide api key
This commit is contained in:
parent
0b15bfbe32
commit
f680188905
4 changed files with 35 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import {
|
|||
getAimlApiKey,
|
||||
getLMStudioApiEndpoint,
|
||||
updateConfig,
|
||||
getOllamaApiKey,
|
||||
} from '@/lib/config';
|
||||
import {
|
||||
getAvailableChatModelProviders,
|
||||
|
|
@ -53,6 +54,7 @@ export const GET = async (req: Request) => {
|
|||
|
||||
config['openaiApiKey'] = getOpenaiApiKey();
|
||||
config['ollamaApiUrl'] = getOllamaApiEndpoint();
|
||||
config['ollamaApiKey'] = getOllamaApiKey();
|
||||
config['lmStudioApiUrl'] = getLMStudioApiEndpoint();
|
||||
config['anthropicApiKey'] = getAnthropicApiKey();
|
||||
config['groqApiKey'] = getGroqApiKey();
|
||||
|
|
@ -93,6 +95,7 @@ export const POST = async (req: Request) => {
|
|||
},
|
||||
OLLAMA: {
|
||||
API_URL: config.ollamaApiUrl,
|
||||
API_KEY: config.ollamaApiKey,
|
||||
},
|
||||
DEEPSEEK: {
|
||||
API_KEY: config.deepseekApiKey,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue