diff options
| author | Martin Bielik <martin.bielik@instea.sk> | 2024-12-05 19:43:24 +0100 |
|---|---|---|
| committer | Martin Bielik <martin.bielik@instea.sk> | 2024-12-05 19:43:24 +0100 |
| commit | 4cb86362752de14d142bca796688af0bf9277215 (patch) | |
| tree | f2b3a59bce217a1e9fb76ce73968f31918aaf50d /doc | |
| parent | 7da48a934c8dc2c6e9165faedef7abe6bb22ec22 (diff) | |
| download | vim-ai-4cb86362752de14d142bca796688af0bf9277215.tar.gz | |
moving from legacy completions api
Diffstat (limited to '')
| -rw-r--r-- | doc/vim-ai.txt | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt index b5674e9..273f074 100644 --- a/doc/vim-ai.txt +++ b/doc/vim-ai.txt @@ -21,17 +21,28 @@ https://github.com/madox2/vim-ai <selection> :AI {instruction} complete the selection using the instruction Options: > - let g:vim_ai_complete = { - \ "engine": "complete", + let s:initial_complete_prompt =<< trim END + >>> system + + You are a general assistant. + Answer shortly, consisely and only what you are asked. + Do not provide any explanantion or comments if not requested. + If you answer in a code, do not wrap it in markdown blocks. + END + + let g:vim_ai_complete_default = { + \ "engine": "chat", \ "options": { - \ "model": "gpt-3.5-turbo-instruct", - \ "endpoint_url": "https://api.openai.com/v1/completions", - \ "max_tokens": 1000, + \ "model": "gpt-4o", + \ "endpoint_url": "https://api.openai.com/v1/chat/completions", + \ "max_tokens": 0, + \ "max_completion_tokens": 0, \ "temperature": 0.1, \ "request_timeout": 20, \ "stream": 1, \ "enable_auth": 1, \ "selection_boundary": "#####", + \ "initial_prompt": s:initial_complete_prompt, \ }, \ "ui": { \ "paste_mode": 1, @@ -48,17 +59,28 @@ https://platform.openai.com/docs/api-reference/completions the instruction Options: > - let g:vim_ai_edit = { - \ "engine": "complete", + let s:initial_complete_prompt =<< trim END + >>> system + + You are a general assistant. + Answer shortly, consisely and only what you are asked. + Do not provide any explanantion or comments if not requested. + If you answer in a code, do not wrap it in markdown blocks. + END + + let g:vim_ai_edit_default = { + \ "engine": "chat", \ "options": { - \ "model": "gpt-3.5-turbo-instruct", - \ "endpoint_url": "https://api.openai.com/v1/completions", - \ "max_tokens": 1000, + \ "model": "gpt-4o", + \ "endpoint_url": "https://api.openai.com/v1/chat/completions", + \ "max_tokens": 0, + \ "max_completion_tokens": 0, \ "temperature": 0.1, \ "request_timeout": 20, \ "stream": 1, \ "enable_auth": 1, \ "selection_boundary": "#####", + \ "initial_prompt": s:initial_complete_prompt, \ }, \ "ui": { \ "paste_mode": 1, |