adding the ability to configure ollama chat options and embeddings params via the config.toml file
This commit is contained in:
parent
46541e6c0c
commit
ad0826111b
8 changed files with 1052 additions and 1388 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue