Skip to content

Commit 93277b6

Browse files
author
skywind3000
committed
update doc
1 parent 72a8228 commit 93277b6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Preface
22

3-
Generate proper git commit message using ChatGPT in Vim:
3+
Generate proper git commit message using ChatGPT or [Ollama](https://github.com/ollama/ollama) in Vim:
44

55
![](https://skywind3000.github.io/images/p/misc/2024/gptcommit1.gif)
66

@@ -18,6 +18,11 @@ Plug 'skywind3000/vim-gpt-commit'
1818
let g:gpt_commit_key = 'Your openai apikey'
1919
" uncomment this line below to enable proxy
2020
" let g:gpt_commit_proxy = 'socks5://127.0.0.1:1080'
21+
22+
" uncomment the following lines to use Ollama:
23+
" let g:gpt_commit_engine = 'ollama'
24+
" let g:gpt_commit_ollama_model = 'llama2'
25+
" let g:gpt_commit_ollama_url = 'http://127.0.0.1:11434/api/chat'
2126
```
2227

2328
For lazy:
@@ -70,6 +75,9 @@ You will see the result in the command line.
7075
| g:gpt_commit_max_line | - | `160` | max diff lines to reference |
7176
| g:gpt_commit_url | - | `''` | alternative request URL, see #1 |
7277
| g:gpt_commit_python | - | `''` | specify the Python executable file explicitly |
78+
| g:gpt_commit_engine | - | `'chatgpt'` | change to 'ollama' to use Ollama |
79+
| g:gpt_commit_ollama_model | Yes | `''` | ollama model |
80+
| g:gpt_commit_ollama_url | - | `''` | explicitly setting ollama URL|
7381

7482
Note #1: the default URL is "https://api.openai.com/v1/chat/completions", can be changed by setting `g:gpt_commit_url`.
7583

0 commit comments

Comments
 (0)