From f469b4619dde8e435dc71ee61614dc1eec23f842 Mon Sep 17 00:00:00 2001 From: imartinez Date: Tue, 2 Apr 2024 18:27:57 +0200 Subject: [PATCH] Add required Ollama setting --- private_gpt/settings/settings.py | 4 ++-- settings-ollama.yaml | 2 +- settings.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/private_gpt/settings/settings.py b/private_gpt/settings/settings.py index 7ec84a7..5df6811 100644 --- a/private_gpt/settings/settings.py +++ b/private_gpt/settings/settings.py @@ -210,8 +210,8 @@ class OllamaSettings(BaseModel): description="Base URL of Ollama API. Example: 'https://localhost:11434'.", ) embedding_api_base: str = Field( - api_base, # default is same as api_base, unless specified differently - description="Base URL of Ollama embedding API. Defaults to the same value as api_base", + "http://localhost:11434", + description="Base URL of Ollama embedding API. Example: 'https://localhost:11434'.", ) llm_model: str = Field( None, diff --git a/settings-ollama.yaml b/settings-ollama.yaml index 4f0be4f..13663dc 100644 --- a/settings-ollama.yaml +++ b/settings-ollama.yaml @@ -14,8 +14,8 @@ ollama: llm_model: mistral embedding_model: nomic-embed-text api_base: http://localhost:11434 + embedding_api_base: http://localhost:11434 # change if your embedding model runs on another ollama keep_alive: 5m - # embedding_api_base: http://ollama_embedding:11434 # uncomment if your embedding model runs on another ollama tfs_z: 1.0 # Tail free sampling is used to reduce the impact of less probable tokens from the output. A higher value (e.g., 2.0) will reduce the impact more, while a value of 1.0 disables this setting. top_k: 40 # Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative. (Default: 40) top_p: 0.9 # Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text. (Default: 0.9) diff --git a/settings.yaml b/settings.yaml index 11c3c42..dfd719b 100644 --- a/settings.yaml +++ b/settings.yaml @@ -99,8 +99,8 @@ ollama: llm_model: llama2 embedding_model: nomic-embed-text api_base: http://localhost:11434 + embedding_api_base: http://localhost:11434 # change if your embedding model runs on another ollama keep_alive: 5m - # embedding_api_base: http://ollama_embedding:11434 # uncomment if your embedding model runs on another ollama request_timeout: 120.0 azopenai: