8000 GitHub - Kamilcuk/kai.nvim: Generate and edit text in Neovim using OpenAI and GPT.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Kamilcuk/kai.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 kai.nvim

Neovim plugin for generating and editing text using OpenAI.

Features

Installing

Generate OpenAI API key from https://beta.openai.com/account/api-keys.

Export the key in $OPENAI_API_KEY environment variable.

Put this with vim-plug:

Plug 'kamilcuk/kai.nvim'

Options

You can avoid loading the plugin with AI commands by setting g:kai_loaded = v:true.

kai_cache_dir string The cache dir used to store conversations history.
kai_chat_use string The current conversation chat to use.
kai_chat_max_tokens integer The maximum number of tokens to send to chat/completions API. There is a limit in the API.
kai_chat_temperature number The temperature option when talking to chat/completions API.
kai_completions_max_tokens integer The maximum number of tokens to send to completions API.
kai_context_after integer The default number of lines to send to completions API after cursor.
kai_context_before integer The default number of lines to send to completione API before cursor.
kai_indicator_text string The indication to show on the indication panel when working.
kai_temperature number The temperature to send to other apis except chat/completions API.
kai_timeout integer Timeout of curl in seconds.

The max tokens for gpt-3 is 4096. The kai_chat_max_tokens is set to 3500, so that there are 500 tokens for the answer.

How do I use this?