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):
213
213
def _process_existing_config (self , default_config ):
214
214
with open (self .config_path , encoding = "utf-8" ) as f :
215
215
existing_config = json .loads (f .read ())
216
+ if "embeddings_fields" not in existing_config :
217
+ existing_config ["embeddings_fields" ] = {}
216
218
merged_config = always_merger .merge (
217
219
default_config ,
218
220
{k : v for k , v in existing_config .items () if v is not None },
@@ -316,6 +318,8 @@ def _read_config(self) -> GlobalConfig:
316
318
with open (self .config_path , encoding = "utf-8" ) as f :
317
319
self ._last_read = time .time_ns ()
318
320
raw_config = json .loads (f .read ())
321
+ if "embeddings_fields" not in raw_config :
322
+ raw_config ["embeddings_fields" ] = {}
319
323
config = GlobalConfig (** raw_config )
320
324
self ._validate_config (config )
321
325
return config
You can’t perform that action at this time.
0 commit comments