[HN Gopher] Show HN: CodeGPT.nvim - ChatGPT plugin for Neovim
       ___________________________________________________________________
        
       Show HN: CodeGPT.nvim - ChatGPT plugin for Neovim
        
       Author : dpayne
       Score  : 130 points
       Date   : 2023-03-08 17:15 UTC (5 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | madelyn wrote:
       | I just tried this out and it's basically exactly what I want! No
       | frills, basic feature set. Was going to make something myself but
       | now I can be even lazier than normal.
        
       | klinquist wrote:
       | This is a ChatGPT plugin for Neovim, not a Neovim plugin for
       | ChatGPT.
        
         | dang wrote:
         | Ok, we've swapped the order in the title above.
        
       | ilaksh wrote:
       | It defaults to temp 0.6. I thought that 0 was better for
       | following instructions? At least it was for text-davinci-003. Is
       | chatgpt-turbo different in this regard?
       | 
       | Also if you have installed any GPT command line program like
       | askleo and don't need to give it context you can just run :r
       | !askleo description of function and language here
       | 
       | Although askleo uses text-davinci-003 so I would use one set up
       | for ChatGPT instead. Or if you are not too lazy this extension
       | looks great.
       | 
       | What would be really nice is something that automatically
       | selected context and then streamed in the code. Also it should
       | come with a short command or default for that.
        
       | qudat wrote:
       | Very cool! I added it to https://neovimcraft.com/?search=codegpt
        
       | renewiltord wrote:
       | Sick dude. Thank you! I love copilot.vim and use it quite
       | extensively. Will try this. I only ever use the ChatGPT service
       | through their website. Do you get an API key by default or is
       | that a separate service?
        
         | behnamoh wrote:
         | Can we have something like the OP's method in VSCode, WITHOUT
         | using CoPilot?
        
         | dpayne wrote:
         | I still use copilot as my main completion tool. I found ChatGPT
         | to be too slow and expensive to use for tab complete level of
         | usage, but it works really well for larger things (e.g.
         | refactor X to do Y, or write unit tests).
         | 
         | You can get your API key here
         | https://platform.openai.com/account/api-keys.
        
           | renewiltord wrote:
           | Thank you!
        
         | jarenmf wrote:
         | Does the API offer access to the same model as the one used in
         | ChatGPT web app? If so it might be way cheaper to use the API
         | than ChatGPT plus?
        
           | capableweb wrote:
           | > Does the API offer access to the same model as the one used
           | in ChatGPT web app?
           | 
           | Chat API is this: https://platform.openai.com/docs/api-
           | reference/chat/create
           | 
           | URL that the plugin is using for the API call is here: https:
           | //github.com/dpayne/CodeGPT.nvim/blob/1ff70459b170ddaf...
           | 
           | TLDR: yes
           | 
           | > If so it might be way cheaper to use the API than ChatGPT
           | plus?
           | 
           | I haven't used ChatGPT Plus, just the normal one. But at
           | least the demonstration GIF makes it seem kind of slow. One
           | selling point of the Plus service is supposedly that you get
           | faster responses.
        
             | jarenmf wrote:
             | I just tested the API, it seems to have the same speed as
             | ChatGPT plus. I quickly tested some questions and it seems
             | that OpenAI web app has a bit more relevant answers, I
             | wonder whether it's related to the temperature and other
             | parameters.
        
           | freedomben wrote:
           | It's not the same. I don't know the technical differences,
           | but in my tests it often returns wildly different results.
           | anecdotally the API has also hallucinated modules that don't
           | exist (but that I wish did!) whereas the chat gpt proper has
           | not done that to me.
        
             | QuadrupleA wrote:
             | I suspect it comes down to the "system" prompt the API lets
             | you set, which is hidden & pre-set on ChatGPT proper.
        
       | _emacsomancer_ wrote:
       | Also in Emacs:
       | 
       | https://github.com/joshcho/ChatGPT.el
       | 
       | https://youtu.be/SL-nNOjqoxg
        
       | robertkrahn01 wrote:
       | Another Emacs integration, using org-mode for ChatGPT and DALL-E:
       | https://github.com/rksm/org-ai
        
       | orsenthil wrote:
       | So, these utilize OpenAI API key. Do people run into limits have
       | to go for paid version while utilizing apps based on openai API?
        
       | aunch wrote:
       | this is really cool and well done. i will start using it in
       | conjunction with Codeium's plugin (free Copilot alternative):
       | https://github.com/Exafunction/codeium.vim
       | 
       | for transparency: I'm from the Codeium team, and we are big fans
       | of getting this AI gen tech to all developers on all IDEs for
       | free - we've also open sourced an emacs plugin:
       | https://github.com/Exafunction/codeium.el
        
         | z3t4 wrote:
         | HN encurage you to mention your own products when relevant, so
         | you don't have to wrap it in, just put it bluntly.
        
         | capableweb wrote:
         | How are you supposed to use two plugins providing the same
         | functionality? Are you gonna compare them and then uninstall
         | one of them? Do they differ?
         | 
         | As far as I can tell, it seems like you just wanted to plug
         | your own plugin, but I'm happy if I'm wrong. I just to
         | understand how you can use two plugins that provide the same
         | functionality and why you would do that.
        
           | aunch wrote:
           | they're complementary! codeium works like copilot, constantly
           | autocompleting what you want to type next, which helps a lot
           | when you already have a decent idea of what you need to get
           | done and need to get it done faster. chatgpt (and chat
           | interfaces in general) help you get some ideas on what to do
           | when you are doing more open-ended exploration, and is
           | explicitly invoked. as developers, we all code in these
           | different "modes" and different tools can be built for each!
        
       | kronion wrote:
       | See also ChatGPT.nvim, which can be used both for editing code
       | and for standard chat: https://github.com/jackMort/ChatGPT.nvim
       | 
       | The Telescope-esque UI is nicely done as well.
        
       | kilgnad wrote:
       | It's like we're LLMs ourselves... generating different flavors of
       | UIs to interface with chatGPT. That's what I think of when I see
       | the proliferation of chatGPT UIs that hit the front page.
       | 
       | Inevitably, human behavior that's similar to an LLM is ripe for
       | replacement by an LLM due to the abundance of behavioral data.
        
         | nico wrote:
         | > It's like we're LLMs ourselves...
         | 
         | Absolutely. That's a very exciting thing. These tools are
         | forcing us to confront who we are.
         | 
         | Interestingly, LLMs (so far) are similarly limited, they can
         | only ingest/digest so much data at a time, so we are trying to
         | figure ways around it.
         | 
         | Just like humans, soon there will be lots of specialized LLMs,
         | ones that do only certain types of law, or only one programming
         | language, or even just one codebase, etc.
         | 
         | Fun times coming.
        
       | QuadrupleA wrote:
       | Ha - this was my weekend project, was pretty sure something
       | similar would pop up in a few days. It's been very handy to ask
       | questions, summarize, proofread, give jailbroken wisecracks, etc.
       | right within VIM where I can slice and dice the text at will.
       | 
       | Not sure if this supports the API's "streaming mode" but it's
       | nice for seeing the output typing in real time. Requires spawning
       | a separate job though.
        
       ___________________________________________________________________
       (page generated 2023-03-08 23:00 UTC)