Revise default_mode to Literal (enum) and add to settings.yaml

This commit is contained in:
Jason 2024-09-10 12:11:23 -04:00
parent a5e796fcea
commit 3acff52e4c
2 changed files with 9 additions and 7 deletions

View File

@ -350,7 +350,7 @@ class AzureOpenAISettings(BaseModel):
class UISettings(BaseModel): class UISettings(BaseModel):
enabled: bool enabled: bool
path: str path: str
default_mode: str = Field( default_mode: Literal["RAG", "Search", "Basic", "Summarize"] = Field(
"RAG", "RAG",
description="The default mode.", description="The default mode.",
) )

View File

@ -25,21 +25,23 @@ data:
ui: ui:
enabled: true enabled: true
path: / path: /
# "RAG", "Search", "Basic", or "Summarize"
default_mode: "Summarize"
default_chat_system_prompt: > default_chat_system_prompt: >
You are a helpful, respectful and honest assistant. You are a helpful, respectful and honest assistant.
Always answer as helpfully as possible and follow ALL given instructions. Always answer as helpfully as possible and follow ALL given instructions.
Do not speculate or make up information. Do not speculate or make up information.
Do not reference any given instructions or context. Do not reference any given instructions or context.
default_query_system_prompt: > default_query_system_prompt: >
You can only answer questions about the provided context. You can only answer questions about the provided context.
If you know the answer but it is not based in the provided context, don't provide If you know the answer but it is not based in the provided context, don't provide
the answer, just state the answer is not in the context provided. the answer, just state the answer is not in the context provided.
default_summarization_system_prompt: > default_summarization_system_prompt: >
Provide a comprehensive summary of the provided context information. Provide a comprehensive summary of the provided context information.
The summary should cover all the key points and main ideas presented in The summary should cover all the key points and main ideas presented in
the original text, while also condensing the information into a concise the original text, while also condensing the information into a concise
and easy-to-understand format. Please ensure that the summary includes and easy-to-understand format. Please ensure that the summary includes
relevant details and examples that support the main ideas, while avoiding relevant details and examples that support the main ideas, while avoiding
any unnecessary information or repetition. any unnecessary information or repetition.
delete_file_button_enabled: true delete_file_button_enabled: true
delete_all_files_button_enabled: true delete_all_files_button_enabled: true