Added a feature to switch API service providers, enabling users to easily toggle between providers as needed.
Added a feature to switch API service providers to the project. Introduced an input field for API providers in the settings interface and included the OPENAI_URL parameter in the config file.
This commit is contained in:
parent
f21f5c9611
commit
1ebe69ec94
5 changed files with 35 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ interface Config {
|
|||
API_KEYS: {
|
||||
OPENAI: string;
|
||||
GROQ: string;
|
||||
OPENAI_URL: string;
|
||||
};
|
||||
API_ENDPOINTS: {
|
||||
SEARXNG: string;
|
||||
|
|
@ -40,6 +41,8 @@ export const getChatModelProvider = () =>
|
|||
|
||||
export const getChatModel = () => loadConfig().GENERAL.CHAT_MODEL;
|
||||
|
||||
export const getOpenaiUrl = () => loadConfig().API_KEYS.OPENAI_URL;
|
||||
|
||||
export const getOpenaiApiKey = () => loadConfig().API_KEYS.OPENAI;
|
||||
|
||||
export const getGroqApiKey = () => loadConfig().API_KEYS.GROQ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue