aduros / ai.vim Goto Github PK
View Code? Open in Web Editor NEWGenerate and edit text in Neovim using OpenAI and GPT.
License: ISC License
Generate and edit text in Neovim using OpenAI and GPT.
License: ISC License
Hello, could the plugin be update to use gpt-3.5-turbo?
thanks in advance, great tool you have here :)
Installed successfully; OPENAI_API_KEY
is set.
When running :AI
in vim, I get the following error:
ai.vim: You exceeded your current quota, please check your plan and billing details.
Everything works fine using the same account in a browser. I encountered the same error in a browser on occasion, but it was fixed by refreshing the window. Not sure how to accomplish the same here?
When editing text by selecting and running with a prompt, it looks like the returned result has empty lines stripped out. This seems to be an issue in the plugin text replacement and not OpenAI.
It's a large feature request but playing with https://cursor.so it seems very powerful.
AI refactoring, but instead of just making the editing having to undo / redo to figure out if it is what you want, the editor shows you an interactive diff where you can "accept all", "accept only this chunk" and their reject equivalents.
What do you think?
The excommand interface is easy to use, but having a more powerful API could open up more advanced use cases.
When using :AI from visual mode:
Error executing Lua callback: .../ygg/.local/share/nvim/lazy/ai.vim/lua/_ai/indicator.lua:41: Invalid 'end_col': out of range
stack traceback:
[C]: in function 'nvim_buf_set_extmark'
.../ygg/.local/share/nvim/lazy/ai.vim/lua/_ai/indicator.lua:41: in function 'create'
...e/ygg/.local/share/nvim/lazy/ai.vim/lua/_ai/commands.lua:52: in function 'ai'
/home/ygg/.local/share/nvim/lazy/ai.vim/plugin/ai.lua:2: in function </home/ygg/.local/share/nvim/lazy/ai.vim/plugin/ai.lua:1>
Press ENTER or type command to continue
Error executing vim.schedule lua callback: ...unov/.local/share/nvim/plugged/ai.
vim/lua/_ai/openai.lua:83: Expected comma or object end but found T_END at chara
cter 336
stack traceback:
[C]: in function 'decode'
...unov/.local/share/nvim/plugged/ai.vim/lua/_ai/openai.lua:83: in funct
ion 'on_stdout_chunk'
...unov/.local/share/nvim/plugged/ai.vim/lua/_ai/openai.lua:14: in funct
ion <...unov/.local/share/nvim/plugged/ai.vim/lua/_ai/openai.lua:13>
I get this error after running <control + a>
Also is it possible to use gpt-4 if I pay for it with this?
8 || /home/kamil/.vim/plugged/ai.vim/lua/_ai/openai.lua:14: in function </home/kamil/.vim/plugged/ai.vim/lua/_ai/openai.lua:13>
7 || Error executing vim.schedule lua callback: /home/kamil/.vim/plugged/ai.vim/lua/_ai/openai.lua:83: Expected comma or object end but found T_END at character 205
6 || stack traceback:
5 || [C]: in function 'decode'
4 || /home/kamil/.vim/plugged/ai.vim/lua/_ai/openai.lua:83: in function 'on_stdout_chunk'
3 || /home/kamil/.vim/plugged/ai.vim/lua/_ai/openai.lua:14: in function </home/kamil/.vim/plugged/ai.vim/lua/_ai/openai.lua:13>
in normal mode and insert mode, it is not entirely clear to me what region of code is being evaluated. Is it the line, the paragraph? Knowing this would be relevant to effectively use this plugin
Is it possible to support vim (non-neovim)?
I added the plugin to Vundle list:
call vundle#begin()
Plugin 'aduros/ai.vim'
call vundle#end()
Then I ran :PluginInstall, and the repo does appear in ~/.vim/bundle
However using :AI returns:
E492: Not an editor command: AI
Being able to define a custom location of a file containing the API key would be useful for those of us who made their dotfiles public.
The workaround right now is to set it via vim.env
outside of the dotfiles repo, and symlink that file into the nvim config, which is unnecessarily many hoops to jump through just to get it set up.
how can i create a key mapping that asks for an input? For instance I have added this:
map("n", "<Leader>a", ":AI<CR>")
but the command should be :AI <type a question here>
I want to have the AI plugin input mode when I press <leader>A
Can this be make to also work with regular vim?
We currently have virtual text to show the response of ChatGPT in realtime and in the event of timeout, these received text are disposed of. It might be useful to retain, in the case where user don't have time to wait indefinitely for the entire response.
As title, sometimes ai.vim takes a really long time and returns error, sometimes it seems to break out of the loop and return a really long but repetitive result which I cannot use.
However, I might have already proceed on to other stuff and most likely do not need the result anymore, so I timeout with the user's preference might help a lot with the situation.
<CTRL-A>
is widely used in vim (e.g. incrementing numbers). I think this is not a good default.
If I am not interested anymore in the completion, or it has done its thing, I have no way to stop it. Would be great to be able to stop it, for example with ctrl+c. Would also be great not to have two concurrent completions running at the same time. Amazing plugin, thanks.
Great plugin, this is really cool! Here are some suggestions how to make it even better:
Have a setup/config that allows to set things like:
Conversation-Mode where one can go back and forth with ChatGPT in a floating window and at the end have the last response parsed into the buffer.
Hey there love this plugin ๐ฅ
I've spun off a hard-fork here that is based on ChatGPT and removes some functionality that you have here (diverges quite a bit from this main)
Changes introduced:
Let me know if you'd like me to open a PR to merge those changes in ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.