From 2bfa855a24a762dd0568670918c8a3157bf77fc9 Mon Sep 17 00:00:00 2001 From: Piyush Jain Date: Thu, 9 Nov 2023 13:05:57 -0800 Subject: [PATCH] Backport PR #450: Updated docs for config. --- docs/source/users/index.md | 49 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/docs/source/users/index.md b/docs/source/users/index.md index 3257823a7..28378ef15 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -949,9 +949,35 @@ following section. #### Configuring as a config file -This configuration can also be specified in a config file in json format. The -file should be named `jupyter_jupyter_ai_config.json` and saved in a path that -JupyterLab can pick from. You can find this path by running `jupyter --paths` +This configuration can also be specified in a config file in json format. + +Here is an example for configuring the `bedrock` provider for `ai21.j2-mid-v1` +model. + +```json +{ + "AiExtension": { + "model_parameters": { + "bedrock:ai21.j2-mid-v1": { + "model_kwargs": { + "maxTokens": 200 + } + } + } + } +} +``` + +There are several ways to specify JupyterLab to pick this config. + +The first option is to save this config in a file and specifying the filepath at startup using the `--config` or `-c` option. + +```bash +jupyter lab --config +``` + +The second option is to drop it in a location that JupyterLab scans for configuration files. +The file should be named `jupyter_jupyter_ai_config.json` in this case. You can find these paths by running `jupyter --paths` command, and picking one of the paths from the `config` section. Here is an example of running the `jupyter --paths` command. @@ -973,20 +999,3 @@ data: runtime: /Users/3coins/Library/Jupyter/runtime ``` - -Here is an example for configuring the `bedrock` provider for `ai21.j2-mid-v1` -model. - -```json -{ - "AiExtension": { - "model_parameters": { - "bedrock:ai21.j2-mid-v1": { - "model_kwargs": { - "maxTokens": 200 - } - } - } - } -} -```