summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/vim-ai.txt42
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,