Show current config on config screen. Load default config if config unset

- Track current (saved/loaded) config separate from the new config (to
  be written) when user clicks Start

- Fallback to using default config when no config for the specific
  content type or processor is specified in khoj.yml
  - Earlier were only loading default config on first run, not after

- Create Child CheckBox, LineEdit classes for Processor Widgets
  - Create ProcessorType, similar to SearchType
  - Track ProcessorType the widgets are associated with
  - Simplify update, save, load of config based on type
This commit is contained in:
Debanjum Singh Solanky
2022-08-11 19:11:25 +03:00
parent 23e06f483d
commit 1ff049599f
3 changed files with 98 additions and 30 deletions

View File

@@ -15,6 +15,10 @@ class SearchType(str, Enum):
Image = "image"
class ProcessorType(str, Enum):
Conversation = "conversation"
class TextSearchModel():
def __init__(self, entries, corpus_embeddings, bi_encoder, cross_encoder, top_k, verbose):
self.entries = entries