Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some ideas... #5

Open
marcomayer opened this issue Dec 13, 2022 · 5 comments
Open

Some ideas... #5

marcomayer opened this issue Dec 13, 2022 · 5 comments

Comments

@marcomayer
Copy link

marcomayer commented Dec 13, 2022

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:

  • Check filetype and if it's go for example, add "in golang" to AI requests automatically.
  • Which model(s) should be used for the different kind of requests
  • Specify different keybinding than CTRL+A which is already mapped by default
  • Choose between column-icon or virtual-text when waiting for response (maybe allow specifying the icon/text)
  • Have option to read the API key from a file like ~/.openai or whatever as exporting isn't the most secure/best option especially for those who got public dotfiles.

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.

@chrisgrieser
Copy link

Check filetype and if it's go for example, add "in golang" to AI requests automatically.

haven't looked into the code, but it does seem that the openAI requests already include the right language, if I run the plugin in a javascript file I get js results, and in a lua file, I get lua results.

@marcomayer
Copy link
Author

haven't looked into the code, but it does seem that the openAI requests already include the right language, if I run the plugin in a javascript file I get js results, and in a lua file, I get lua results.

Hmm I was in a .go file earlier and did something like "AI write function to ..." and got JS code :-)

@aduros
Copy link
Owner

aduros commented Dec 13, 2022

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.

This could be very useful if the UX is good!

@aduros
Copy link
Owner

aduros commented Dec 13, 2022

Hmm I was in a .go file earlier and did something like "AI write function to ..." and got JS code :-)

I've noticed better results when using context completion instead of prompts for this kind of thing. So instead of :AI write a function to add two numbers doing:

// A function that adds two numbers
<Ctrl-A>

Or better yet, writing out the function signature:

function add (x: number, y: number): number {
    <Ctrl-A>
}

When using completion mode (no prompt) the plugin sends 20 lines of text above and below the cursor that helps to give context to OpenAI.

@chunleng
Copy link

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.

This could be very useful if the UX is good!

This will be good!

There's this use case that I found that it to complete using ai.vim, where I visually highlight a chunk of code and tell chatgpt3 to "explain this". Because of the nature of the plugin now, it can only look at the code, try to change it and come back with weird result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants