Christopher-Hayes / vscode-chatgpt-reborn

Refactor, improve, and debug your code in VSCode with GPT-3 and GPT-4.
https://marketplace.visualstudio.com/items?itemName=chris-hayes.chatgpt-reborn
ISC License
207 stars 38 forks source link

GPT-4 Turbo (gpt-4-1106-preview) model not included in ChatGPT Reborn VSCode extension #54

Closed xmjiao closed 7 months ago

xmjiao commented 8 months ago

Describe the feature

Any plan to add support for GPT-4 Turbo, aka gpt-4-1106-preview?

The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. Returns a maximum of 4,096 output tokens. This preview model is not yet suited for production traffic. It has a context window of 128,000 tokens.

See: https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo

Christopher-Hayes commented 7 months ago

Thanks Jiao, I'll have the update shipped this weekend.

Previously this extension assumed input token limit ~= output token limit, but with gpt-4-turbo's 128,000 input limit, and 4,096 output limit this code needs to be changed. So, taking a little bit longer than the usual addition of a new model.

xmjiao commented 7 months ago

Hi Christopher, thanks for your efforts! It would be useful to change the "gpt3" variable name to "openai" or simply "gpt" in the setting options to avoid confusion.

Christopher-Hayes commented 7 months ago

Release v3.20.0 has been deployed with gpt-4-turbo support.

https://github.com/Christopher-Hayes/vscode-chatgpt-reborn/releases/tag/3.20.0

Thanks for the suggestion Jiao, yeah the config settings is something I've been meaning to update.

The complication is that we'll have to programmically change user's settings to use the new config name. Originally it was left "as is" to allow users to jump between this fork and the "Genie AI" extension and use the same settings, but it's been several months now, so config compatibility is no longer needed.

xmjiao commented 7 months ago

Hi Chris, Thanks for the update! I tried it and found that it indeed supports GPT-4 Turbo. When I tried it with a medium-sized Python code, but I got the following error message:

This conversation uses 31331 tokens, but the "maxTokens" set in the extension settings is 4096. Please increase the "maxTokens" setting or reduce the amount of code you are sending. To increase the limit, hit "More Actions" > "Settings" > search for "maxTokens".

It seems the code still checks the maximum token of 4096 somewhere, even though it states that it is disabled in the settings.

Christopher-Hayes commented 7 months ago

Oops! Thanks for catching that. v3.20.2 has been pushed, which should fix that issue. https://github.com/Christopher-Hayes/vscode-chatgpt-reborn/releases/tag/fix-gpt-4-turbo-4096