Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
77 changes: 77 additions & 0 deletions docs/user-guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,80 @@ Options:
--use-active-decorator --no-use-active-decorator If the migration should use the active decorator. [default: use-active-decorator]
--help Show this message and exit.
```

### providers

```bash
> nemoguardrails find-providers --help

Usage: nemoguardrails find-providers [OPTIONS]

Interactive provider selection.

This command provides an interactive interface to select between text completion
and chat completion providers. It will guide you through selecting the type of
provider (text completion or chat completion) and then show you the available
providers for that type.

Options:
--list, -l Just list all available providers without interactive selection
--help Show this message and exit.
```

### Find Providers Command

The `providers` command provides an interactive interface to explore and select LLM providers available in NeMo Guardrails. It supports both text completion and chat completion providers.

```bash
nemoguardrails find-providers [--list]
```

#### Options

- `--list`, `-l`: Just list all available providers without interactive selection

#### Interactive Mode

When run without the `--list` option, the command provides an interactive interface:

1. First, you'll be prompted to select a provider type:
- Type to filter between "text completion" and "chat completion", you can press Tab to autocomplete.
- Use arrow keys to navigate through matches
- Press Tab to autocomplete
- Press Enter to select

2. Then, you'll be prompted to select a specific provider:
- Type to filter through available providers
- Use arrow keys to navigate through matches
- Press Tab to autocomplete
- Press Enter to select

#### Example Usage

```bash
# List all available providers
nemoguardrails find-providers --list

# Interactive provider selection
nemoguardrails find-providers
```

#### Example Output

```
Available Provider Types: (type to filter, use arrows to select)
• text completion
• chat completion

Select provider type: text

Available text completion providers: (type to filter, use arrows to select)
• anthropic
• google_palm
• openai
• ...

Select provider: openai

Selected text completion provider: openai
```
18 changes: 17 additions & 1 deletion docs/user-guides/configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,22 @@ To use any of the providers, you must install additional packages; when you firs
Although you can instantiate any of the previously mentioned LLM providers, depending on the capabilities of the model, the NeMo Guardrails toolkit works better with some providers than others. The toolkit includes prompts that have been optimized for certain types of models, such as models provided by`openai` or `llama3` models. For others, you can optimize the prompts yourself following the information in the [LLM Prompts](#llm-prompts) section.
```

#### Exploring Available Providers

To help you explore and select the right LLM provider for your needs, NeMo Guardrails provides the `find-providers` command. This command offers an interactive interface to discover available providers:

```bash
nemoguardrails find-providers [--list]
```

The command supports two modes:
- Interactive mode (default): Guides you through selecting a provider type (text completion or chat completion) and then shows available providers for that type
- List mode (`--list`): Simply lists all available providers without interactive selection

This can be particularly helpful when you're setting up your configuration and need to explore which providers are available and supported.

For more details about the command and its usage, see the [CLI documentation](../cli.md#find-providers-command).

#### Using LLMs with Reasoning Traces

By default, reasoning models, such as [DeepSeek-R1](https://huggingface.co/collections/deepseek-ai/deepseek-r1-678e1e131c0169c0bc89728d), include the reasoning traces in the model response.
Expand Down Expand Up @@ -1038,7 +1054,7 @@ register_log_adapter(YourCustomAdapter, "CustomLogAdapter")

#### Example: Creating a Custom Adapter

Heres a simple example of a custom adapter that logs interaction logs to a custom backend:
Here's a simple example of a custom adapter that logs interaction logs to a custom backend:

```python
from nemoguardrails.tracing.adapters.base import InteractionLogAdapter
Expand Down