File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/jupyter-ai/jupyter_ai Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,10 @@ def _write_config(self, new_config: JaiConfig):
317
317
}
318
318
319
319
self ._validate_config (new_config )
320
+
321
+ # Create config directory if it doesn't exist.
322
+ os .makedirs (os .path .dirname (self .config_path ), exist_ok = True )
323
+
320
324
with open (self .config_path , "w" ) as f :
321
325
json .dump (new_config .model_dump (), f , indent = self .indentation_depth )
322
326
@@ -361,7 +365,7 @@ def chat_model_args(self) -> dict[str, Any]:
361
365
user.
362
366
363
367
If the current chat model is `None`, this returns an empty dictionary.
364
- Otherwise, it returns the model arguments set in the dictionary at
368
+ Otherwise, it returns the model arguments set in the dictionary at
365
369
`.fields.<chat-model-id>`.
366
370
"""
367
371
config = self ._read_config ()
@@ -401,4 +405,3 @@ def completion_model_params(self):
401
405
def delete_api_key (self , key_name : str ):
402
406
# TODO: store in .env files
403
407
pass
404
-
You can’t perform that action at this time.
0 commit comments