Skip to content

Commit 88a80c7

Browse files
committed
docs: touch up
1 parent 340e1b5 commit 88a80c7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ environment variables, a config.yaml file, and default values, in that respectiv
365365
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
366366
| `name` | The prefix for environment variable overrides. | 'openai' |
367367
| `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 | '' |
368369
| `omit_history` | If true, the chat history will not be used to provide context for the GPT model. | false |
369370
| `command_prompt` | The command prompt in interactive mode. Should be single-quoted. | '[%datetime] [Q%counter]' |
370371
| `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
438439
439440
### Switching Between Configurations with --target
440441
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
442443
especially useful if you use multiple LLM providers (like OpenAI, Perplexity, Azure, etc.) or have different contexts or
443444
workflows that require distinct settings.
444445
445446
How it Works
446447
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:
448449
449450
```shell
450451
config.<target>.yaml
@@ -459,13 +460,13 @@ chatgpt --target perplexity --config
459460
This will load:
460461
461462
```shell
462-
~/.chatgpt-cli/config/config.perplexity.yaml
463+
~/.chatgpt-cli/config.perplexity.yaml
463464
```
464465
465466
If the --target flag is not provided, the CLI falls back to:
466467
467468
```shell
468-
~/.chatgpt-cli/config/config.yaml
469+
~/.chatgpt-cli/config.yaml
469470
```
470471
471472
Example Setup
@@ -474,18 +475,17 @@ You can maintain the following structure:
474475
475476
```shell
476477
~/.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
482482
```
483483
484484
Then switch between them like so:
485485
486486
```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"
489489
```
490490
491491
Or just use the default:

cmd/chatgpt/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ func setCustomHelp(rootCmd *cobra.Command) {
743743
printFlagWithPadding("--output", "The output audio file for text-to-speech")
744744
printFlagWithPadding("--role-file", "Set the system role from the specified file")
745745
printFlagWithPadding("--debug", "Print debug messages")
746-
printFlagWithPadding("--target", "The specific model to target")
746+
printFlagWithPadding("--target", "Load configuration from config.<target>.yaml")
747747
printFlagWithPadding("--mcp", "Specify the MCP plugin in the form <provider>/<plugin>@<version>")
748748
printFlagWithPadding("--param", "Key-value pair as key=value. Can be specified multiple times")
749749
printFlagWithPadding("--params", "Provide parameters as a raw JSON string")

0 commit comments

Comments
 (0)