Skip to content

Commit

Permalink
docs(c): update c README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudbridgeuy committed Aug 15, 2023
1 parent 9df4104 commit a51dd2d
Showing 1 changed file with 75 additions and 70 deletions.
145 changes: 75 additions & 70 deletions crates/c/README.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,102 @@
# c - Chatbot CLI
# c - Interact with Chat AI APIs

## Usage

```
c [COMMAND]
```
Interact with AI chatbots through the command-line interface (CLI).

## Commands

### anthropic
### `anthropic`

Anthropic Chat API
Uses Anthropic's Claude API.

```
c anthropic [OPTIONS] --anthropic-api-key <ANTHROPIC_API_KEY> [PROMPT]
c anthropic [OPTIONS] --anthropic-api-key <KEY> [PROMPT]
```

Interact with Anthropic's Claude chatbot API. Allows specifying model, temperature, max tokens etc.
#### Arguments

### openai
| Argument | Description |
|-|-|
| `PROMPT` | The prompt text to send to Claude. |

OpenAI Chat API
#### Options

```
c openai [OPTIONS] --openai-api-key <OPENAI_API_KEY> [PROMPT]
```
| Option | Description |
|-|-|
| `--session` | Chat session name to store context. |
| `--model` | Claude model to use (claude-v1, claude2, etc). |
| `--max-tokens` | Max tokens to generate. |
| `--temperature` | Randomness of response. |
| `--top-k` | Only sample from top k tokens. |
| `--top-p` | Nucleus sampling top-p. |
| `--stop-sequences` | Strings to stop generation. |
| `--anthropic-api-key` | Anthropic API key. |
| `--silent` | Silent mode. |
| `--stream` | Stream response incrementally. |
| `--pin` | Pin message to history. |
| `--format` | Output format (raw, json, yaml). |
| `-h, --help` | Print help. |

Interact with OpenAI's chatbot API. Allows specifying model, temperature, max tokens etc.

### help
### `openai`

Print help for commands and options
Uses OpenAI's GPT API.

```
c help [COMMAND]
c openai [OPTIONS] --openai-api-key <KEY> [PROMPT]
```

## Options

**-h, --help**

Print help

## Anthropic Options

**--model**

Claude model to use (default: claude-v1)

**--temperature**

Randomness of response (default: 1)

**--max-tokens**

Maximum tokens to generate (default: 1000)
#### Arguments

**--stop-sequences**
| Argument | Description |
|-|-|
| `PROMPT` | The prompt text to send GPT. |

Strings to stop generation
#### Options

**--anthropic-api-key**
| Option | Description |
|-|-|
| `--session` | Chat session name to store context. |
| `--model` | GPT model to use (gpt3, gpt4, etc). |
| `--max-tokens` | Max tokens to generate. |
| `--temperature` | Randomness of response. |
| `--top-p` | Nucleus sampling top-p. |
| `--stop` | Sequences to stop generation. |
| `--openai-api-key` | OpenAI API key. |
| `--silent` | Silent mode. |
| `--stream` | Stream response incrementally. |
| `--pin` | Pin message to history. |
| `--format` | Output format (raw, json, yaml). |
| `-h, --help` | Print help. |

Anthropic API key
### `vertex`

## OpenAI Options
Uses Google Vertex AI Code API.

**--model**

OpenAI model to use

**--temperature**

Randomness of response (default: 1)

**--max-tokens**

Maximum tokens to generate

**--openai-api-key**

OpenAI API key

## Output Options

**-s, --silent**

Silent mode

**--stream**

Stream output
```
c vertex [OPTIONS] --google-api-key <KEY> [PROMPT]
```

**-f, --format**
#### Arguments

| Argument | Description |
|-|-|
| `PROMPT` | The prompt text to send Vertex AI. |

#### Options

| Option | Description |
|-|-|
| `--session` | Chat session name to store context. |
| `--model` | Vertex model to use. |
| `--max-tokens` | Max tokens to generate. |
| `--temperature` | Randomness of response. |
| `--top-k` | Only sample from top k tokens. |
| `--top-p` | Nucleus sampling top-p. |
| `--stop-sequences` | Strings to stop generation. |
| `--google-api-key` | Google Vertex API key. |
| `--silent` | Silent mode. |
| `--stream` | Stream response incrementally. |
| `--pin` | Pin message to history. |
| `--format` | Output format (raw, json, yaml). |
| `-h, --help` | Print help. |

Output format (default: raw)

0 comments on commit a51dd2d

Please sign in to comment.