Skip to content

Commit bebbed8

Browse files
authored
v 3.0.17 (#366)
1 parent 37fb140 commit bebbed8

35 files changed

+25059
-17331
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ git add <files...>
5858
oco
5959
```
6060

61-
Link to the GitMoji specification: https://gitmoji.dev/
61+
### Running locally with Ollama
6262

6363
You can also run it with local model through ollama:
6464

@@ -70,12 +70,20 @@ You can also run it with local model through ollama:
7070
git add <files...>
7171
OCO_AI_PROVIDER='ollama' opencommit
7272
```
73+
74+
If you want to use a model other than mistral, you can do so by setting the `OCO_AI_PROVIDER` environment variable as follows:
75+
76+
```sh
77+
OCO_AI_PROVIDER='ollama/llama3:8b' opencommit
78+
```
79+
7380
if you have ollama that is set up in docker/ on another machine with GPUs (not locally), you can change the default endpoint url.
7481
You can do so by setting the `OCO_OLLAMA_API_URL` environment variable as follows:
7582

7683
```sh
7784
OCO_OLLAMA_API_URL='http://192.168.1.10:11434/api/chat' opencommit
7885
```
86+
7987
where 192.168.1.10 is example of endpoint URL, where you have ollama set up.
8088

8189
### Flags
@@ -84,6 +92,8 @@ There are multiple optional flags that can be used with the `oco` command:
8492

8593
#### Use Full GitMoji Specification
8694

95+
Link to the GitMoji specification: https://gitmoji.dev/
96+
8797
This flag can only be used if the `OCO_EMOJI` configuration item is set to `true`. This flag allows users to use all emojis in the GitMoji specification, By default, the GitMoji full specification is set to `false`, which only includes 10 emojis (🐛✨📝🚀✅♻️⬆️🔧🌐💡).
8898
This is due to limit the number of tokens sent in each request. However, if you would like to use the full GitMoji specification, you can use the `--fgm` flag.
8999

@@ -112,11 +122,12 @@ OCO_TOKENS_MAX_OUTPUT=<max response tokens (default: 500)>
112122
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
113123
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
114124
OCO_EMOJI=<boolean, add GitMoji>
115-
OCO_MODEL=<either 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'>
125+
OCO_MODEL=<either 'gpt-4o', 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'>
116126
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
117127
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
118128
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint, default: conventional-commit>
119129
OCO_ONE_LINE_COMMIT=<one line commit message, default: false>
130+
OCO_AI_PROVIDER=<anthropic, azure, ollama or ollama/model default ollama model: mistral>
120131
```
121132

122133
### Global config for all repos
@@ -126,7 +137,7 @@ Local config still has more priority than Global config, but you may set `OCO_MO
126137
Simply set any of the variables above like this:
127138

128139
```sh
129-
oco config set OCO_MODEL=gpt-4
140+
oco config set OCO_MODEL=gpt-4o
130141
```
131142

132143
Configure [GitMoji](https://gitmoji.dev/) to preface a message.
@@ -143,7 +154,7 @@ oco config set OCO_EMOJI=false
143154

144155
### Switch to GPT-4 or other models
145156

146-
By default, OpenCommit uses `gpt-3.5-turbo` model.
157+
By default, OpenCommit uses `gpt-4o` model.
147158

148159
You may switch to GPT-4 which performs better, but costs ~x15 times more 🤠
149160

@@ -154,17 +165,9 @@ oco config set OCO_MODEL=gpt-4
154165
or for as a cheaper option:
155166

156167
```sh
157-
oco config set OCO_MODEL=gpt-3.5-turbo
168+
oco config set OCO_MODEL=gpt-4o-mini
158169
```
159170

160-
or for GPT-4 Turbo (Preview) which is more capable, has knowledge of world events up to April 2023, a 128k context window and 2-3x cheaper vs GPT-4:
161-
162-
```sh
163-
oco config set OCO_MODEL=gpt-4-0125-preview
164-
```
165-
166-
Make sure that you spell it `gpt-4` (lowercase) and that you have API access to the 4th model. Even if you have ChatGPT+, that doesn't necessarily mean that you have API access to GPT-4.
167-
168171
### Switch to Azure OpenAI
169172

170173
By default OpenCommit uses [OpenAI](https://openai.com).
@@ -220,7 +223,7 @@ Replace `<module>` with either `conventional-commit` or `@commitlint`.
220223

221224
#### Example:
222225

223-
To switch to using th` '@commitlint` prompt module, run:
226+
To switch to using the `'@commitlint` prompt module, run:
224227

225228
```sh
226229
oco config set OCO_PROMPT_MODULE=@commitlint
@@ -388,7 +391,7 @@ jobs:
388391
OCO_OPENAI_BASE_PATH: ''
389392
OCO_DESCRIPTION: false
390393
OCO_EMOJI: false
391-
OCO_MODEL: gpt-3.5-turbo
394+
OCO_MODEL: gpt-4o
392395
OCO_LANGUAGE: en
393396
OCO_PROMPT_MODULE: conventional-commit
394397
```

0 commit comments

Comments
 (0)