From 1cd91f97d3b99e947fd9bc548953d53e23d743d4 Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Fri, 10 Nov 2023 03:07:23 +0100 Subject: [PATCH] Backport PR #450: Updated docs for config. (#461) Co-authored-by: Piyush Jain --- 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 - } - } - } - } -} -```