Skip to content

Commit

Permalink
feat(doc): minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
efugier committed Nov 13, 2023
1 parent 9323b5a commit c188fba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smartcat"
version = "0.1.10"
version = "0.1.11"
authors = ["Emilien Fugier <[email protected]>"]
description = '''
Putting a brain behind `cat`.
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_MESSAGE>
system "config" message to send after the prompt and before the first user message
-c, --command <COMMAND>
custom prompt to append before the input
-a, --after-input <AFTER_INPUT>
suffix to add after the input and the custom prompt
-s, --system-message <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 <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 <MODEL>
which model (of the api) to use
overrides which model (of the api) to use
-f, --file <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 <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
Expand All @@ -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

```
Expand Down
19 changes: 9 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
#[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<String>,
/// which api to hit
repeat_input: bool,
/// overrides which api to hit
#[arg(long)]
api: Option<config::Api>,
#[arg(short, long)]
/// which model (of the api) to use
/// overrides which model (of the api) to use
model: Option<String>,
/// skip reading from the input and read this file instead
#[arg(short, long)]
file: Option<String>,
/// 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<String>,
}
Expand Down

0 comments on commit c188fba

Please sign in to comment.