File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Preface
2
2
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:
4
4
5
5
![ ] ( https://skywind3000.github.io/images/p/misc/2024/gptcommit1.gif )
6
6
@@ -18,6 +18,11 @@ Plug 'skywind3000/vim-gpt-commit'
18
18
let g:gpt_commit_key = 'Your openai apikey'
19
19
" uncomment this line below to enable proxy
20
20
" 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'
21
26
```
22
27
23
28
For lazy:
@@ -70,6 +75,9 @@ You will see the result in the command line.
70
75
| g: gpt_commit_max_line | - | ` 160 ` | max diff lines to reference |
71
76
| g: gpt_commit_url | - | ` '' ` | alternative request URL, see #1 |
72
77
| 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|
73
81
74
82
Note #1 : the default URL is "https://api.openai.com/v1/chat/completions ", can be changed by setting ` g:gpt_commit_url ` .
75
83
You can’t perform that action at this time.
0 commit comments