Skip to content

Commit f19620d

Browse files
committed
docs(cli): add providers fuzzy search cli command
1 parent 34a94c6 commit f19620d

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

docs/user-guides/cli.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,82 @@ Options:
146146
--use-active-decorator --no-use-active-decorator If the migration should use the active decorator. [default: use-active-decorator]
147147
--help Show this message and exit.
148148
```
149+
### providers
150+
151+
```bash
152+
> nemoguardrails providers --help
153+
154+
Usage: nemoguardrails providers [OPTIONS]
155+
156+
Interactive provider selection.
157+
158+
This command provides an interactive interface to select between text completion
159+
and chat completion providers. It will guide you through selecting the type of
160+
provider (text completion or chat completion) and then show you the available
161+
providers for that type.
162+
163+
Options:
164+
--list, -l Just list all available providers without interactive selection
165+
--help Show this message and exit.
166+
```
167+
168+
### Providers Command
169+
170+
The `providers` command provides an interactive interface to explore and select LLM providers. It supports both text completion and chat completion providers.
171+
172+
```bash
173+
nemoguardrails providers [--list]
174+
```
175+
176+
### Options
177+
178+
- `--list`, `-l`: Just list all available providers without interactive selection
179+
180+
### Interactive Mode
181+
182+
When run without the `--list` option, the command provides an interactive interface:
183+
184+
1. First, you'll be prompted to select a provider type:
185+
- Type to filter between "text completion" and "chat completion"
186+
- Use arrow keys to navigate through matches
187+
- Press Tab to autocomplete
188+
- Press Enter to select
189+
190+
2. Then, you'll be prompted to select a specific provider:
191+
- Type to filter through available providers
192+
- Use arrow keys to navigate through matches
193+
- Press Tab to autocomplete
194+
- Press Enter to select
195+
- The selected provider name is automatically copied to your clipboard
196+
197+
### Example Usage
198+
199+
```bash
200+
# List all available providers
201+
nemoguardrails providers --list
202+
203+
# Interactive provider selection
204+
nemoguardrails providers
205+
```
206+
207+
### Example Output
208+
209+
```
210+
Available Provider Types: (type to filter, use arrows to select)
211+
• text completion
212+
• chat completion
213+
214+
Select provider type: text
215+
216+
Available text completion providers: (type to filter, use arrows to select)
217+
• anthropic
218+
• google_palm
219+
• openai
220+
• ...
221+
222+
Select provider: openai
223+
224+
Copied 'openai' to clipboard!
225+
226+
Selected text completion provider: openai
227+
```

0 commit comments

Comments
 (0)