Add Serper API as an alternative search provider option for faster speeds and no rate limitations from Google

This commit is contained in:
Roger M 2024-04-29 19:44:53 +01:00
parent ab6cda690f
commit 4cd0778094
12 changed files with 137 additions and 32 deletions

View file

@ -13,6 +13,7 @@ interface Config {
};
API_KEYS: {
OPENAI: string;
SERPER: string;
};
API_ENDPOINTS: {
SEARXNG: string;
@ -41,6 +42,8 @@ export const getChatModel = () => loadConfig().GENERAL.CHAT_MODEL;
export const getOpenaiApiKey = () => loadConfig().API_KEYS.OPENAI;
export const getSerperApiKey = () => loadConfig().API_KEYS.SERPER;
export const getSearxngApiEndpoint = () => loadConfig().API_ENDPOINTS.SEARXNG;
export const getOllamaApiEndpoint = () => loadConfig().API_ENDPOINTS.OLLAMA;