diff --git a/Cargo.toml b/Cargo.toml index e003df9..8de8691 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "smartcat" -version = "0.1.10" +version = "0.1.11" authors = ["Emilien Fugier "] description = ''' Putting a brain behind `cat`. diff --git a/README.md b/README.md index 2352f0c..02b0c04 100644 --- a/README.md +++ b/README.md @@ -5,31 +5,30 @@ Puts a brain behind cat! WIP cli interface to language models to bring them in the Unix ecosystem ``` -Putting a brain behind `cat`. WIP cli interface to language model to bring them in the Unix ecosystem 🐈‍⬛ +Putting a brain behind `cat`. WIP cli interface to bring language models in the Unix ecosystem 🐈‍⬛ Usage: sc [OPTIONS] [PROMPT] Arguments: - [PROMPT] which prompt in the config to fetch. - The config must have at least one named "default" containing which model and api to hit by default [default: default] + [PROMPT] which prompt in the config to fetch [default: default] Options: + -s, --system-message + system "config" message to send after the prompt and before the first user message -c, --command custom prompt to append before the input -a, --after-input suffix to add after the input and the custom prompt - -s, --system-message - a system "config" message to send before the first user message + -r, --repeat-input + whether to repeat the input before the output, useful to extend instead of replacing --api - which api to hit [possible values: openai, another-api-for-tests] + overrides which api to hit [possible values: openai, another-api-for-tests] -m, --model - which model (of the api) to use + overrides which model (of the api) to use -f, --file skip reading from the input and read this file instead - -r, --repeat-input - wether to repeat the input before the output, useful to extend instead of replacing -i, --input - skips reading from input and use that value instead + skip reading from input and use that value instead -h, --help Print help -V, --version @@ -51,9 +50,11 @@ cargo install smartcat Or download directly the binary compiled for your platform from the [release page](https://github.com/efugier/smartcat/releases). -On the first run, the program will ask you to generate some default configuration files if it cannot find them. +On the first run, `smartcat` will ask you to generate some default configuration files if it cannot find them. More about that in the [configuration section](#Configuration). +A `default` prompt is needed for `smartcat` to know which api and model to hit. + ## A few examples to get started ``` diff --git a/src/main.rs b/src/main.rs index cd439cc..fb4e4b3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,28 +20,27 @@ mod config; long_about = None )] struct Cli { - /// which prompt in the config to fetch. The config must have at least one named "default" - /// containing which model and api to hit by default. + /// which prompt in the config to fetch #[arg(default_value_t = String::from("default"))] prompt: String, + /// system "config" message to send after the prompt and before the first user message + #[arg(short, long)] + system_message: Option, #[command(flatten)] custom_prompt_args: CustomPrompt, - /// a system "config" message to send before the first user message + /// whether to repeat the input before the output, useful to extend instead of replacing #[arg(short, long)] - system_message: Option, - /// which api to hit + repeat_input: bool, + /// overrides which api to hit #[arg(long)] api: Option, #[arg(short, long)] - /// which model (of the api) to use + /// overrides which model (of the api) to use model: Option, /// skip reading from the input and read this file instead #[arg(short, long)] file: Option, - /// wether to repeat the input before the output, useful to extend instead of replacing - #[arg(short, long)] - repeat_input: bool, - /// skips reading from input and use that value instead + /// skip reading from input and use that value instead #[arg(short, long)] input: Option, }