Skip to content

Commit

Permalink
doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
codergeek121 committed Jul 17, 2023
1 parent 222baa0 commit dbe44a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ CLAI (CLI + AI = CLAI) allows you to interact with the OpenAI API in your termin
First, ensure that you have Ruby installed on your system. Then, you can install the gem by running:

```
$ gem install clai
gem install clai
```

## Configuration

Before using the CLI tool, you need to configure it with your OpenAI API key. You can obtain an API key from the OpenAI website. Once you have your API key, run the following command and provide your key when prompted:

```
$ clai setup
clai setup
```

This will create a configuration file (`~/.config/clai/clai.yml`) on your system.
Expand All @@ -33,7 +33,7 @@ Read more about the setup command [here](docs/setup.md).
You can chat with ChatGPT with:

```
$ clai chat "Tell me a funny joke"
clai chat "Tell me a funny joke"
```

This will send the given prompt to the API and display the generated completion.
Expand All @@ -43,7 +43,7 @@ This will send the given prompt to the API and display the generated completion.
To view the available commands and options, you can use the `help` command:

```
$ clai help
clai help
```

This will display a list of supported commands and their descriptions.
Expand All @@ -53,7 +53,7 @@ This will display a list of supported commands and their descriptions.
You can start an interactive session with `clai session` command.

```
$ clai session
clai session
Your prompt: <Enter your prompt here><Enter>
```

Expand All @@ -63,18 +63,18 @@ This will start a REPL like process to interact with the OpenAI api.

Here are a few examples to get you started:

```sh
```
# Setup clai on your machine
$ clai setup
clai setup
# Start an interactive chat session
$ clai session
clai session
# Get help about the available commands and options
$ clai help
clai help
# Send a single prompt
$ clai chat "Hello World"
clai chat "Hello World"
```

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion docs/chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Some examples:


```
$ clai chat "Tell me a funny joke"
clai chat "Tell me a funny joke"
```

0 comments on commit dbe44a8

Please sign in to comment.