Skip to content

Commit

Permalink
Rename default openai command to prompt, refs #17
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 15, 2023
1 parent d8c0dbe commit be2589a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage

The default command for this is `llm openai` - you can use `llm` instead if you prefer.
The default command for this is `llm prompt` - you can use `llm` instead if you prefer.

## Executing a prompt

Expand Down
6 changes: 3 additions & 3 deletions llm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

@click.group(
cls=DefaultGroup,
default="openai",
default="prompt",
default_if_no_args=True,
)
@click.version_option()
def cli():
"Access large language models from the command-line"


@cli.command(name="openai")
@cli.command(name="prompt")
@click.argument("prompt", required=False)
@click.option("--system", help="System prompt to use")
@click.option("-4", "--gpt4", is_flag=True, help="Use GPT-4")
Expand All @@ -54,7 +54,7 @@ def cli():
)
@click.option("--code", is_flag=True, help="System prompt to optimize for code output")
@click.option("--key", help="API key to use")
def openai_(prompt, system, gpt4, model, stream, no_log, code, _continue, chat_id, key):
def prompt(prompt, system, gpt4, model, stream, no_log, code, _continue, chat_id, key):
"Execute a prompt against on OpenAI model"
if prompt is None:
# Read from stdin instead
Expand Down

0 comments on commit be2589a

Please sign in to comment.