summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMartin Bielik <mx.bielik@gmail.com>2023-03-21 18:47:49 +0100
committerMartin Bielik <mx.bielik@gmail.com>2023-03-21 18:47:49 +0100
commit10055ff30501767b8749b72f9059e058da32f932 (patch)
tree2b6a251dae49fade02857a23bc7ecda02a24de6e /README.md
parent8125570fc4ca94b085857eadc563eafc2c0564a5 (diff)
downloadvim-ai-10055ff30501767b8749b72f9059e058da32f932.tar.gz
openai configuration docu
Diffstat (limited to '')
-rw-r--r--README.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md
index d2776b6..ab35f11 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,33 @@ nnoremap <leader>a :AI<CR>
xnoremap <leader>a :AI<CR>
```
+### Completion configuration
+
+Request to the OpenAI API can be configured for each command. Below are listed available options with default values.
+
+```vim
+" :AI
+" - https://platform.openai.com/docs/api-reference/completions
+let g:vim_ai_complete.options.model = "text-davinci-003"
+let g:vim_ai_complete.options.max_tokens = 1000
+let g:vim_ai_complete.options.temperature = 0.1
+let g:vim_ai_complete.options.request_timeout = 10
+
+" :AIEdit
+" - https://platform.openai.com/docs/api-reference/completions
+let g:vim_ai_edit.options.model = "text-davinci-003"
+let g:vim_ai_edit.options.max_tokens = 1000
+let g:vim_ai_edit.options.temperature = 0.1
+let g:vim_ai_edit.options.request_timeout = 10
+
+" :AIChat
+" - https://platform.openai.com/docs/api-reference/chat
+let g:vim_ai_chat.options.model = "gpt-3.5-turbo"
+let g:vim_ai_chat.options.max_tokens = 1000
+let g:vim_ai_chat.options.temperature = 1
+let g:vim_ai_chat.options.request_timeout = 10
+```
+
### Custom commands
To customize and re-use prompts it is useful to put some context to the language model. You can do it with prepending text to `:AI` command.