adding the ability to configure ollama chat options and embeddings params via the config.toml file

This commit is contained in:
Owyn Richen 2025-02-05 13:33:17 -08:00
parent 46541e6c0c
commit ad0826111b
8 changed files with 1052 additions and 1388 deletions

View file

@ -20,6 +20,8 @@ interface Config {
SEARXNG: string;
OLLAMA: string;
};
OLLAMA_CHAT_OPTIONS: {};
OLLAMA_EMBEDDINGS_PARAMS: {};
}
type RecursivePartial<T> = {
@ -51,6 +53,10 @@ export const getSearxngApiEndpoint = () =>
export const getOllamaApiEndpoint = () => loadConfig().API_ENDPOINTS.OLLAMA;
export const getOllamaChatOptions = () => loadConfig().OLLAMA_CHAT_OPTIONS;
export const getOllamaEmbeddingsParams = () =>
loadConfig().OLLAMA_EMBEDDINGS_PARAMS;
export const updateConfig = (config: RecursivePartial<Config>) => {
const currentConfig = loadConfig();