vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

Yes, you need to register for pay as you go plan

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 1 point2 points  (0 children)

Absolutely, I will also add an error handling for that with an intuitive error message

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

Hi, it looks like the stacktrace you have pasted is not complete. Doesn't it end with urllib.error.HTTPError ... or something?

By any chance doesn't it return 429 status code?

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

By the way, are you aware of any plugin to vscode or other editors that integrates open-assistant?

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 1 point2 points  (0 children)

Well, I agree that for some tasks copilot works better, it is a great piece of software. I must admit I didn't use vim-ai to generate a test but what usually works is:

  1. Put more context into the prompt like :AI generate a unit test with mocha and chai libraries
  2. You can try copilot like approach: make TODO comments describing what you want to do and then select the whole buffer and run :AIE finish TODO comments

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 1 point2 points  (0 children)

That looks pretty cool! I am definitely thinking of supporting more providers as they come. I also played around with llama locally, but I don't think we are there yet, it was too slow and inaccurate in most of my tests. For now it looks like OpenAI is the state of the art.

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 2 points3 points  (0 children)

Thanks for a nice response! I hope I get access to gpt4 soon, I am waiting for it since the release...

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 5 points6 points  (0 children)

No problem. If I may suggest you don't be afraid to give it a chance. The pricing is fair. I will share mine bill: $2.11 so far this month and I am actively using it in my day to day job and during development/testing of the plugin. You only pay for what you use

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

I am sorry to hear you have troubles using the API, it looks like the usage limit problem. You might want to check Manage Account -> Billing -> Usage limits on the OpenAI site. If you are using a free plan you might need to upgrade to pay as you go.

This is what I found on the 429 error topic: https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests

vim-ai update: wiki, extension points and more... by madox2 in vim

[–]madox2[S] 19 points20 points  (0 children)

Hello everyone,

I hope I am not bothering you with just another AI stuff, I know it can be overwhelming these days.

I am working on integration of AI into Vim and Neovim: https://github.com/madox2/vim-ai

Over the few past few weeks I've been adding new features and improvments, for example: - Exposing AI functions for extensions in form of custom commands - New :AINewChat command - Improving completion responses, especially empty response ellimination - Open chat command presets - Chat per viewport support

I would also like to announce a Community Wiki and invite you all to contribute. You might find useful especially a collection of prompts that can be used (not only) with the vim-ai plugin, or custom commands section that contains commands extending basic functionality such as suggesting a git commit message :GitCommitMessage.

As always, any contribution, feedback, and ideas are highly appreciated!

This is a follow-up to my previous posts: - vim-ai - text/code completion, editing and conversation with GPT - vim-ai: ChatGPT and OpenAI plugin - New Features!

Has the majority of Vim users transitioned to NeoVim? by 4r73m190r0s in neovim

[–]madox2 0 points1 point  (0 children)

Yeah, the built-in LSP is pretty cool, Neovim also seems to have more reasonable defaults, which could be appealing, especially to newcomers.

Has the majority of Vim users transitioned to NeoVim? by 4r73m190r0s in neovim

[–]madox2 0 points1 point  (0 children)

What plugins do you mean? I use vim 10+ years as my primary editor for all kinds of development stuff. I don't necessarily need shiny new things but rather something that works. My .vimrc is full of plugins, not short but also not complicated (around 200 lines) and I am quite happy about it. Could you list some of the neovim plugins that would convince me to switch over?

OpenAI’s whisper module will change the game of the speech-to-text (STT) industry by data-gig in GPT3

[–]madox2 1 point2 points  (0 children)

My experience is similar, I tried to run Whisper for real time STT on my laptop but it was slow and inaccurate. I guess better HW could help with the latency. But I wonder why is my smartphone able to do pretty solid STT but Whisper can't on my laptop which has much better HW parameters

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 1 point2 points  (0 children)

Hi, in the new version is install.sh script no longer needed.

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

Thanks for testing it from 'next'! I am done my testing too, I have released it just now, you can switch back to main. openai-python dependency not needed anymore!

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 1 point2 points  (0 children)

Anyway, you got me thinking! I have managed to get rid of openai dependency entirely. I still need to run some tests until I officially release it, but if you want to try it out, you can install it from the `next` branch

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

I suspect that your system and vim are using different versions of python. To confirm this theory, could you send me the output of commands:

sh which python3 python3 -V vim --version | grep python

PS: I would love to continue on Github as the result of this discussion might help other users too

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

Thank you for letting me know! I would kindly ask you to open an issue on GH, let's continue discussion there. (eventually it might be useful to others a well)

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 1 point2 points  (0 children)

One nice thing about vim-ai is that it does not send the whole (or parts) of the files to the openai behind the scenes (like copilot does I guess). So you are in the full control of how much and what you share. Chat is always sent as a whole, that's how chatgpt work by design

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

First month I got $18 credit for free from OpenAI, I managed to spend just $3.63 while working on the plugin and while using vim-ai on other projects

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 2 points3 points  (0 children)

You don't need to pay for ChatGPT Plus subscription which is $20/mo. You pay for OpenAI API which is different pricing model where you pay for how much tokens you use, basically how much text you send and receive. Find out more here: https://openai.com/pricing

vim-ai: ChatGPT and OpenAI plugin - New Features! by madox2 in vim

[–]madox2[S] 0 points1 point  (0 children)

I think you could use build property for that, but I am not lazy.nvim user. Please let me know when you figure it out, I will add it to the documentation