File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/jupyter-ai/jupyter_ai Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ def _init_config(self):
213213 def _process_existing_config (self , default_config ):
214214 with open (self .config_path , encoding = "utf-8" ) as f :
215215 existing_config = json .loads (f .read ())
216+ if "embeddings_fields" not in existing_config :
217+ existing_config ["embeddings_fields" ] = {}
216218 merged_config = always_merger .merge (
217219 default_config ,
218220 {k : v for k , v in existing_config .items () if v is not None },
@@ -316,6 +318,8 @@ def _read_config(self) -> GlobalConfig:
316318 with open (self .config_path , encoding = "utf-8" ) as f :
317319 self ._last_read = time .time_ns ()
318320 raw_config = json .loads (f .read ())
321+ if "embeddings_fields" not in raw_config :
322+ raw_config ["embeddings_fields" ] = {}
319323 config = GlobalConfig (** raw_config )
320324 self ._validate_config (config )
321325 return config
You can’t perform that action at this time.
0 commit comments