From 4a9a44ec891c81af93bcf5d5ddde2e1fb481317d Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Mon, 10 Apr 2023 11:27:31 +0200 Subject: chat options docu --- README.md | 22 +++++++++++++++++++++- doc/vim-ai.txt | 17 +++++++++++++++++ plugin/vim-ai.vim | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 360a471..b66c177 100644 --- a/README.md +++ b/README.md @@ -122,8 +122,9 @@ Default interface configuration: ```vim let g:vim_ai_chat = { \ "ui": { -\ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", \ "code_syntax_enabled": 1, +\ "populate_options": 0, +\ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", \ }, \} ``` @@ -160,6 +161,25 @@ let g:vim_ai_chat = { \} ``` +Or modify options directly during the vim session: + +```vim +let g:vim_ai_chat['options']['model'] = 'gpt-4' +let g:vim_ai_chat['options']['temperature'] = 0.2 +``` + +You can also customize the options in the chat header: + +```properties +[chat-options] +model=gpt-4 +temperature=0.2 + +>>> user + +generate a paragraph of lorem ipsum +``` + Below are listed available options along with default values: ```vim diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt index ed70ef1..05b73ca 100644 --- a/doc/vim-ai.txt +++ b/doc/vim-ai.txt @@ -79,6 +79,7 @@ Options: > \ }, \ "ui": { \ "code_syntax_enabled": 1, + \ "populate_options": 0, \ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", \ }, \} @@ -103,6 +104,22 @@ a selection of options: > \ }, \} +Or modify options directly during the vim session: > + + let g:vim_ai_chat['options']['model'] = 'gpt-4' + let g:vim_ai_chat['options']['temperature'] = 0.2 + +You can also customize the options in the chat header: > + + [chat-options] + model=gpt-4 + temperature=0.2 + + >>> user + + generate a paragraph of lorem ipsum + ... + KEY BINDINGS Examples how configure key bindins and customize commands: > diff --git a/plugin/vim-ai.vim b/plugin/vim-ai.vim index 5a6e3e0..972e04f 100644 --- a/plugin/vim-ai.vim +++ b/plugin/vim-ai.vim @@ -33,8 +33,8 @@ let g:vim_ai_chat_default = { \ }, \ "ui": { \ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", -\ "code_syntax_enabled": 1, \ "populate_options": 0, +\ "code_syntax_enabled": 1, \ }, \} -- cgit v1.2.3