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 /autoload | |
| parent | 7da48a934c8dc2c6e9165faedef7abe6bb22ec22 (diff) | |
| download | vim-ai-4cb86362752de14d142bca796688af0bf9277215.tar.gz | |
moving from legacy completions api
Diffstat (limited to '')
| -rw-r--r-- | autoload/vim_ai_config.vim | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/autoload/vim_ai_config.vim b/autoload/vim_ai_config.vim index a9aeccf..991b320 100644 --- a/autoload/vim_ai_config.vim +++ b/autoload/vim_ai_config.vim @@ -1,32 +1,44 @@ let s:plugin_root = expand('<sfile>:p:h:h') +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": "complete", +\ "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, \ }, \} let g:vim_ai_edit_default = { -\ "engine": "complete", +\ "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, |