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 @@ -217,6 +217,8 @@ def _init_config(self):
217217 def _process_existing_config (self , default_config ):
218218 with open (self .config_path , encoding = "utf-8" ) as f :
219219 existing_config = json .loads (f .read ())
220+ if "embeddings_fields" not in existing_config :
221+ existing_config ["embeddings_fields" ] = {}
220222 merged_config = always_merger .merge (
221223 default_config ,
222224 {k : v for k , v in existing_config .items () if v is not None },
@@ -320,6 +322,8 @@ def _read_config(self) -> GlobalConfig:
320322 with open (self .config_path , encoding = "utf-8" ) as f :
321323 self ._last_read = time .time_ns ()
322324 raw_config = json .loads (f .read ())
325+ if "embeddings_fields" not in raw_config :
326+ raw_config ["embeddings_fields" ] = {}
323327 config = GlobalConfig (** raw_config )
324328 self ._validate_config (config )
325329 return config
You can’t perform that action at this time.
0 commit comments