mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-16 01:53:10 +00:00
docs: auto generated documentation for providers (#2543)
# What does this PR do? Simple approach to get some provider pages in the docs. Add or update description fields in the provider configuration class using Pydantic’s Field, ensuring these descriptions are clear and complete, as they will be used to auto-generate provider documentation via ./scripts/distro_codegen.py instead of editing the docs manually. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
8d8e90d78e
commit
c9a49a80e8
96 changed files with 2562 additions and 65 deletions
10
docs/source/providers/safety/index.md
Normal file
10
docs/source/providers/safety/index.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Safety Providers
|
||||
|
||||
This section contains documentation for all available providers for the **safety** API.
|
||||
|
||||
- [inline::code-scanner](inline_code-scanner.md)
|
||||
- [inline::llama-guard](inline_llama-guard.md)
|
||||
- [inline::prompt-guard](inline_prompt-guard.md)
|
||||
- [remote::bedrock](remote_bedrock.md)
|
||||
- [remote::nvidia](remote_nvidia.md)
|
||||
- [remote::sambanova](remote_sambanova.md)
|
13
docs/source/providers/safety/inline_code-scanner.md
Normal file
13
docs/source/providers/safety/inline_code-scanner.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# inline::code-scanner
|
||||
|
||||
## Description
|
||||
|
||||
Code Scanner safety provider for detecting security vulnerabilities and unsafe code patterns.
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
{}
|
||||
|
||||
```
|
||||
|
19
docs/source/providers/safety/inline_llama-guard.md
Normal file
19
docs/source/providers/safety/inline_llama-guard.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# inline::llama-guard
|
||||
|
||||
## Description
|
||||
|
||||
Llama Guard safety provider for content moderation and safety filtering using Meta's Llama Guard model.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `excluded_categories` | `list[str` | No | [] | |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
excluded_categories: []
|
||||
|
||||
```
|
||||
|
19
docs/source/providers/safety/inline_prompt-guard.md
Normal file
19
docs/source/providers/safety/inline_prompt-guard.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# inline::prompt-guard
|
||||
|
||||
## Description
|
||||
|
||||
Prompt Guard safety provider for detecting and filtering unsafe prompts and content.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `guard_type` | `<class 'str'>` | No | injection | |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
guard_type: injection
|
||||
|
||||
```
|
||||
|
28
docs/source/providers/safety/remote_bedrock.md
Normal file
28
docs/source/providers/safety/remote_bedrock.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# remote::bedrock
|
||||
|
||||
## Description
|
||||
|
||||
AWS Bedrock safety provider for content moderation using AWS's safety services.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `aws_access_key_id` | `str \| None` | No | | The AWS access key to use. Default use environment variable: AWS_ACCESS_KEY_ID |
|
||||
| `aws_secret_access_key` | `str \| None` | No | | The AWS secret access key to use. Default use environment variable: AWS_SECRET_ACCESS_KEY |
|
||||
| `aws_session_token` | `str \| None` | No | | The AWS session token to use. Default use environment variable: AWS_SESSION_TOKEN |
|
||||
| `region_name` | `str \| None` | No | | The default AWS Region to use, for example, us-west-1 or us-west-2.Default use environment variable: AWS_DEFAULT_REGION |
|
||||
| `profile_name` | `str \| None` | No | | The profile name that contains credentials to use.Default use environment variable: AWS_PROFILE |
|
||||
| `total_max_attempts` | `int \| None` | No | | An integer representing the maximum number of attempts that will be made for a single request, including the initial attempt. Default use environment variable: AWS_MAX_ATTEMPTS |
|
||||
| `retry_mode` | `str \| None` | No | | A string representing the type of retries Boto3 will perform.Default use environment variable: AWS_RETRY_MODE |
|
||||
| `connect_timeout` | `float \| None` | No | 60 | The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds. |
|
||||
| `read_timeout` | `float \| None` | No | 60 | The time in seconds till a timeout exception is thrown when attempting to read from a connection.The default is 60 seconds. |
|
||||
| `session_ttl` | `int \| None` | No | 3600 | The time in seconds till a session expires. The default is 3600 seconds (1 hour). |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
{}
|
||||
|
||||
```
|
||||
|
21
docs/source/providers/safety/remote_nvidia.md
Normal file
21
docs/source/providers/safety/remote_nvidia.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# remote::nvidia
|
||||
|
||||
## Description
|
||||
|
||||
NVIDIA's safety provider for content moderation and safety filtering.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `guardrails_service_url` | `<class 'str'>` | No | http://0.0.0.0:7331 | The url for accessing the Guardrails service |
|
||||
| `config_id` | `str \| None` | No | self-check | Guardrails configuration ID to use from the Guardrails configuration store |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
guardrails_service_url: ${env.GUARDRAILS_SERVICE_URL:=http://localhost:7331}
|
||||
config_id: ${env.NVIDIA_GUARDRAILS_CONFIG_ID:=self-check}
|
||||
|
||||
```
|
||||
|
21
docs/source/providers/safety/remote_sambanova.md
Normal file
21
docs/source/providers/safety/remote_sambanova.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# remote::sambanova
|
||||
|
||||
## Description
|
||||
|
||||
SambaNova's safety provider for content moderation and safety filtering.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `url` | `<class 'str'>` | No | https://api.sambanova.ai/v1 | The URL for the SambaNova AI server |
|
||||
| `api_key` | `pydantic.types.SecretStr \| None` | No | | The SambaNova cloud API Key |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
url: https://api.sambanova.ai/v1
|
||||
api_key: ${env.SAMBANOVA_API_KEY}
|
||||
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue