From 11fd47c3fdd634ee03d33b08b53a6e0ae14fa6dc Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Sat, 8 Apr 2023 13:03:49 +0200 Subject: initial chat prompt docu --- README.md | 11 ++++++++++- doc/vim-ai.txt | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bbc9b91..66115ca 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,15 @@ let g:vim_ai_edit = { \ }, \} + +" This prompt instructs model to work with syntax highlighting +let s:initial_chat_prompt =<< trim END +>>> system + +You are a general assistant. +If you attach a code block add syntax type annotation to it, for example ```python. +END + " :AIChat " - https://platform.openai.com/docs/api-reference/chat let g:vim_ai_chat = { @@ -197,7 +206,7 @@ let g:vim_ai_chat = { \ "max_tokens": 1000, \ "temperature": 1, \ "request_timeout": 10, -\ "initial_prompt": "", +\ "initial_prompt": s:initial_chat_prompt, \ }, \} ``` diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt index 45adcfb..30fc5cb 100644 --- a/doc/vim-ai.txt +++ b/doc/vim-ai.txt @@ -61,13 +61,21 @@ https://platform.openai.com/docs/api-reference/completions the instruction or both Options: > + + let s:initial_chat_prompt =<< trim END + >>> system + + You are a general assistant. + If you attach a code block add syntax type annotation to it, for example ```python. + END + let g:vim_ai_chat = { \ "options": { \ "model": "gpt-3.5-turbo", \ "max_tokens": 1000, \ "temperature": 1, \ "request_timeout": 10, - \ "initial_prompt": "", + \ "initial_prompt": s:initial_chat_prompt, \ }, \ "ui": { \ "code_syntax_enabled": 1, -- cgit v1.2.3