Hacker News new | past | comments | ask | show | jobs | submit login

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?



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.


Do these api keys still work for free users?


Thank you!


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?


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.


I suspect it comes down to the "system" prompt the API lets you set, which is hidden & pre-set on ChatGPT proper.


> 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.


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.


Can we have something like the OP's method in VSCode, WITHOUT using CoPilot?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: