@@ -365,6 +365,7 @@ environment variables, a config.yaml file, and default values, in that respectiv
365
365
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
366
366
| `name` | The prefix for environment variable overrides. | ' openai' |
367
367
| `thread` | The name of the current chat thread. Each unique thread name has its own context. | ' default' |
368
+ | `target` | Load configuration from config._target_.yaml | ' ' |
368
369
| `omit_history` | If true, the chat history will not be used to provide context for the GPT model. | false |
369
370
| `command_prompt` | The command prompt in interactive mode. Should be single-quoted. | ' [%datetime] [Q%counter]' |
370
371
| `output_prompt` | The output prompt in interactive mode. Should be single-quoted. | ' ' |
@@ -438,13 +439,13 @@ If these environment variables are not set, the application defaults to ~/.chatg
438
439
439
440
### Switching Between Configurations with --target
440
441
441
- You can maintain multiple configuration files side by side and switch between them using the --target flag. This is
442
+ You can maintain multiple configuration files side by side and switch between them using the ` --target` flag. This is
442
443
especially useful if you use multiple LLM providers (like OpenAI, Perplexity, Azure, etc.) or have different contexts or
443
444
workflows that require distinct settings.
444
445
445
446
How it Works
446
447
447
- When you use the --target flag, the CLI loads a config file named:
448
+ When you use the ` --target` flag, the CLI loads a config file named:
448
449
449
450
```shell
450
451
config.<target>.yaml
@@ -459,13 +460,13 @@ chatgpt --target perplexity --config
459
460
This will load:
460
461
461
462
```shell
462
- ~/.chatgpt-cli/config/config .perplexity.yaml
463
+ ~/.chatgpt-cli/config.perplexity.yaml
463
464
```
464
465
465
466
If the --target flag is not provided, the CLI falls back to:
466
467
467
468
```shell
468
- ~/.chatgpt-cli/config/config .yaml
469
+ ~/.chatgpt-cli/config.yaml
469
470
```
470
471
471
472
Example Setup
@@ -474,18 +475,17 @@ You can maintain the following structure:
474
475
475
476
```shell
476
477
~/.chatgpt-cli/
477
- ├── config/
478
- │ ├── config.yaml # Default (e.g., OpenAI)
479
- │ ├── config.perplexity.yaml # Perplexity setup
480
- │ ├── config.azure.yaml # Azure-specific config
481
- │ └── config.llama.yaml # LLaMA setup
478
+ ├── config.yaml # Default (e.g., OpenAI)
479
+ ├── config.perplexity.yaml # Perplexity setup
480
+ ├── config.azure.yaml # Azure-specific config
481
+ └── config.llama.yaml # LLaMA setup
482
482
```
483
483
484
484
Then switch between them like so:
485
485
486
486
```shell
487
- chatgpt --target azure --query "Explain Azure' s GPT model differences"
488
- chatgpt --target perplexity " Summarize this article: "
487
+ chatgpt --target azure "Explain Azure' s GPT model differences"
488
+ chatgpt --target perplexity " What are some good restaurants in the Red Hook area "
489
489
` ` `
490
490
491
491
Or just use the default:
0 commit comments