feat: request timeout config (#191)
Co-authored-by: Hiroki Osame <hiroki.osame@gmail.com>
This commit is contained in:
13
README.md
13
README.md
@@ -74,10 +74,6 @@ aicommits --generate <i> # or -g <i>
|
||||
|
||||
> Warning: this uses more tokens, meaning it costs more.
|
||||
|
||||
```sh
|
||||
aicommits --all
|
||||
```
|
||||
|
||||
### Git hook
|
||||
|
||||
You can also integrate _aicommits_ with Git via the [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. This lets you use Git like you normally would, and edit the commit message before committing.
|
||||
@@ -189,6 +185,15 @@ The Chat Completions (`/v1/chat/completions`) model to use. Consult the list of
|
||||
> Tip: If you have access, try upgrading to [`gpt-4`](https://platform.openai.com/docs/models/gpt-4) for next-level code analysis. It can handle double the input size, but comes at a higher cost. Check out OpenAI's website to learn more.
|
||||
|
||||
|
||||
#### timeout
|
||||
The timeout for network requests to the OpenAI API in milliseconds.
|
||||
|
||||
Default: `10000` (10 seconds)
|
||||
|
||||
```sh
|
||||
aicommits config set timeout=20000 # 20s
|
||||
```
|
||||
|
||||
## How it works
|
||||
|
||||
This CLI tool runs `git diff` to grab all your latest code changes, sends them to OpenAI's GPT-3, then returns the AI generated commit message.
|
||||
|
||||
Reference in New Issue
Block a user