Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define block and allow lists for providers #415

Merged
merged 7 commits into from
Oct 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/source/users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,3 +748,32 @@ The `--region-name` parameter is set to the [AWS region code](https://docs.aws.a
The `--request-schema` parameter is the JSON object the endpoint expects as input, with the prompt being substituted into any value that matches the string literal `"<prompt>"`. For example, the request schema `{"text_inputs":"<prompt>"}` will submit a JSON object with the prompt stored under the `text_inputs` key.

The `--response-path` option is a [JSONPath](https://goessner.net/articles/JsonPath/index.html) string that retrieves the language model's output from the endpoint's JSON response. For example, if your endpoint returns an object with the schema `{"generated_texts":["<output>"]}`, its response path is `generated_texts.[0]`.


## Configuration
3coins marked this conversation as resolved.
Show resolved Hide resolved

### Block-listing providers
3coins marked this conversation as resolved.
Show resolved Hide resolved
This configuration allows for blocking specific providers in the settings panel. This list takes precedence over the allowlist in the next section.

```
jupyter lab --Ai.blocked_providers=openai
3coins marked this conversation as resolved.
Show resolved Hide resolved
```

To block more than one provider in the block-list, repeat the runtime configuration.
3coins marked this conversation as resolved.
Show resolved Hide resolved

```
jupyter lab --Ai.blocked_providers=openai --Ai.blocked_providers=ai21
3coins marked this conversation as resolved.
Show resolved Hide resolved
```

### Allow-listing providers
3coins marked this conversation as resolved.
Show resolved Hide resolved
This configuration allows for filtering the list of providers in the settings panel to only an allow-listed set of providers.
3coins marked this conversation as resolved.
Show resolved Hide resolved

```
jupyter lab --Ai.allowed_providers=openai
3coins marked this conversation as resolved.
Show resolved Hide resolved
```

To allow more than one provider in the allow-list, repeat the runtime configuration.
3coins marked this conversation as resolved.
Show resolved Hide resolved

```
jupyter lab --Ai.allowed_providers=openai --Ai.allowed_providers=ai21
3coins marked this conversation as resolved.
Show resolved Hide resolved
```
Loading