6 ms·
But I need an GPT-4 api key for that, right? The normal API keys don't work?
by phil42 4y ago
But I need an GPT-4 api key for that, right? The normal API keys don't work?
- tonyoconnell 4y agoSeems to fall back to GPT 3 if you haven't got access to GPT 4 API yet
- fredliu 4y agohmm... doesn't seem to be the case, when I provided my gpt-3 turbo key the error message indicates the gpt-4 model doesn't exist.
- capableweb 4y agoChange this https://github.com/enricoros/nextjs-chatgpt-app/blob/466a3667a48060d406d60943af01fe26366563fb/pages/api/chat.ts#L15 https://github.com/enricoros/nextjs-chatgpt-app/blob/466a366... to say "gpt-3.5-tubo" and it should work for you
- trendoid 4y agoI updated the model in that file, deployed again using Vercel but still same error.
- capableweb 4y agoIt seems like it's setting gpt-4 here as well: https://github.com/enricoros/nextjs-chatgpt-app/blob/466a3667a48060d406d60943af01fe26366563fb/pages/api/chat.ts#L133 https://github.com/enricoros/nextjs-chatgpt-app/blob/466a366... But come on, read through the source, look for the issue, I'm sure you can track down at least something :)
- trendoid 4y agoSorry, as soon as posted my comment, I looked again and found the other occurrence. It's quite late here and I just followed your advice blindly :) Works now.
- enricoros 4y agoHey guys, op here. Merged the PR for 3.5-Turbo support and cleaned up the code (very good observations on all the places 'gpt-4' was hardcoded). Combo box to select the model. GPT-4 will need a 4-enabled key, while 3.5-Turbo will work with any GPT key.
- capableweb 4y agoThe keys for GPT3 (`GPT-3.5-turbo` is the actual model ID) is the same as for GPT-4. You define the model when you make the request to the API.
- layer8 4y agoDoes this work if you only have GPT-4 access via a ChatGPT subscription (ChatGPT Plus)?
- fredliu 4y agoIt doesn't. Even if you have ChatGPT Plus, the key you have only supports 3.5 unless you are explicitly given the gpt-4 key.
- fredliu 4y agoThere seems to be already a PR for adding 3.5 support. The community and speed of change in this field is mind blowing!
- capableweb 4y agoOh yeah, changing 33 lines is truly revolutionary!
- enricoros 4y agoOP: I went to sleep with this as my 1st post and 1 star, and woke up with a PR for 3.5-Turbo pending. Community for the win!
- capableweb 4y agoIt's true that you need explicit access to the GPT-4 to use the API, but again, it's not a different key. I'm using the same API key for accessing `gpt-3.5-turbo` as I use for `gpt-4`.