From f945d18a6feb8f41539123e0f4546ffa07ade721 Mon Sep 17 00:00:00 2001 From: Wesley Stewart Date: Fri, 15 Mar 2024 13:03:33 +0000 Subject: [PATCH] Updated settings files to include RAG settings --- private_gpt/settings/settings.py | 7 +------ settings-local.yaml | 5 ++++- settings.yaml | 6 ++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/private_gpt/settings/settings.py b/private_gpt/settings/settings.py index c7cf8a71..05f24dca 100644 --- a/private_gpt/settings/settings.py +++ b/private_gpt/settings/settings.py @@ -102,14 +102,9 @@ class LLMSettings(BaseModel): 0.1, description="The temperature of the model. Increasing the temperature will make the model answer more creatively. A value of 0.1 would be more factual.", ) - similarity_value: float = Field( - None, - description="If set, any documents retrieved from the RAG must meet a certain score. Acceptable values are between 0 and 1.", - ) - class RagSettings(BaseModel): - similarity_value: float = Field( + similarity_value: float | None = Field( None, description="If set, any documents retrieved from the RAG must meet a certain score. Acceptable values are between 0 and 1.", ) diff --git a/settings-local.yaml b/settings-local.yaml index 2c1995bc..50502cd4 100644 --- a/settings-local.yaml +++ b/settings-local.yaml @@ -23,4 +23,7 @@ vectorstore: database: qdrant qdrant: - path: local_data/private_gpt/qdrant \ No newline at end of file + path: local_data/private_gpt/qdrant + +rag: + similarity_value: # Leave empty to not use. Otherwise set between 0 and 1. This value checks for how well sources match your context. diff --git a/settings.yaml b/settings.yaml index 181cfc39..b0975810 100644 --- a/settings.yaml +++ b/settings.yaml @@ -41,10 +41,8 @@ llm: context_window: 3900 temperature: 0.1 # The temperature of the model. Increasing the temperature will make the model answer more creatively. A value of 0.1 would be more factual. (Default: 0.1) -# -# The rag settings are optional. Only include if you know what you are doing. -#rag: - #similarity_value: 0.4 #Optional - If set, any documents retrieved from the RAG must meet a certain score. Acceptable values are between 0 and 1. +rag: + similarity_value: # Leave empty to not use. Otherwise set between 0 and 1. This value checks for how well sources match your context. llamacpp: prompt_style: "mistral"