Add OpenaiURL

This commit is contained in:
blue-eyed 2024-06-17 21:03:56 +08:00
parent 476303f52b
commit e980945d59
4 changed files with 159 additions and 168 deletions

View file

@ -16,6 +16,7 @@ interface Config {
API_ENDPOINTS: {
SEARXNG: string;
OLLAMA: string;
OPENAI: string;
};
}
@ -41,6 +42,8 @@ export const getSearxngApiEndpoint = () => loadConfig().API_ENDPOINTS.SEARXNG;
export const getOllamaApiEndpoint = () => loadConfig().API_ENDPOINTS.OLLAMA;
export const getOpenaiApiEndpoint = () => loadConfig().API_ENDPOINTS.OPENAI;
export const updateConfig = (config: RecursivePartial<Config>) => {
const currentConfig = loadConfig();