From 4ab7019b1c9e2379ad114d40aedd0d1f55477674 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Tue, 28 Mar 2023 23:02:52 +0200 Subject: redo command docu --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index dc997a3..a197b55 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ Plug 'madox2/vim-ai', { 'do': './install.sh' } ### :AIChat - `:AIChat` - continue or start a new conversation. `(visual selection)? :AIChat {instruction}?` - start a new conversation given the selection, the instruction or both @@ -76,6 +75,13 @@ You are a Clean Code expert, I have the following code, please refactor it in a Supported chat roles are **`>>> system`**, **`>>> user`** and **`<<< assistant`** +### :AIRedo + +Use this immediately after `AI`/`AIEdit`/`AIChat` command in order to re-try or get an alternative completion. +Note that the randomness of responses heavily depends on the [`temperature`](https://platform.openai.com/docs/api-reference/completions/create#completions/create-temperature) parameter. + +`:AIRedo` - repeat last AI command + ## Configuration ### Key bindings @@ -94,6 +100,9 @@ nnoremap s :AIEdit fix grammar and spelling " trigger chat xnoremap c :AIChat nnoremap c :AIChat + +" redo last AI command +nnoremap r :AIRedo ``` ### Completion configuration -- cgit v1.2.3 From b5c8ebc5647d54e192d266fc81cabcbacd93496e Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Tue, 28 Mar 2023 23:05:31 +0200 Subject: redo command docu --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a197b55..8900f2f 100644 --- a/README.md +++ b/README.md @@ -77,11 +77,11 @@ Supported chat roles are **`>>> system`**, **`>>> user`** and **`<<< assistant`* ### :AIRedo +`:AIRedo` - repeat last AI command + Use this immediately after `AI`/`AIEdit`/`AIChat` command in order to re-try or get an alternative completion. Note that the randomness of responses heavily depends on the [`temperature`](https://platform.openai.com/docs/api-reference/completions/create#completions/create-temperature) parameter. -`:AIRedo` - repeat last AI command - ## Configuration ### Key bindings -- cgit v1.2.3 From 923746952c3d4794343f0505f4a6389fb6926bdb Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Sun, 2 Apr 2023 23:41:48 +0200 Subject: open chat command docu --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 8900f2f..f92377c 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,37 @@ nnoremap c :AIChat nnoremap r :AIRedo ``` + +### Interface configuration + +Default interface configuration: + +```vim +let g:vim_ai_chat = { +\ "ui": { +\ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", +\ }, +\} +``` + +Tips: + +```vim +" restore conversation from the file +let g:vim_ai_chat = { +\ "ui": { +\ "open_chat_command": "below new /tmp/last_conversation.aichat", +\ }, +\} + +" open chat in a new tab +let g:vim_ai_chat = { +\ "ui": { +\ "open_chat_command": "tabnew | call vim_ai#MakeScratchWindow()", +\ }, +\} +``` + ### Completion configuration Request to the OpenAI API can be configured for each command. -- cgit v1.2.3