ai-genie/chatgpt-vscode

GPT-4 Turbo (gpt-4-1106-preview) model not included in Genie VSCode extension

mreduar opened this issue · 13 comments

Describe the feature

The Genie VSCode extension currently does not include the newly added gpt-4-1106-preview model from OpenAI. As of today, OpenAI has released this new model, and it would be beneficial for users to have access to it through the extension.

Expected behavior:

When using the Genie VSCode extension, users should be able to select and utilize the gpt-4-1106-preview model for code generation and assistance.

Current behavior:

The gpt-4-1106-preview model is not available as an option within the Genie VSCode extension.

Additional context:

This new model could potentially provide better results and improved assistance for users, so it would be a valuable addition to the extension. 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. Learn more.

Seems this extension is no longer maintained? Last update was over half a year ago. Too bad, it's the cleanest, best performing extension for interaction with ChatGPT

If anyone knows of any good extension that do support gpt-4-1106-preview I'd like to hear suggestions

Seems this extension is no longer maintained? Last update was over half a year ago. Too bad, it's the cleanest, best performing extension for interaction with ChatGPT

If anyone knows of any good extension that do support gpt-4-1106-preview I'd like to hear suggestions

Yeah, it's a shame because it's definitely the best feeling one that doesn't try to make you use their own services.

I've searched and so far I've found two that come close but don't feel quite as good. One being feiskyer.chatgpt-copilot and the other I "think" was this one: zhang-renyang.chat-gpt. You could also add gpt-4-1106-preview manually to the Genie minified extension.js and package.json files.

@wizardlyluke Would you please share some details about how to do this:
"You could also add gpt-4-1106-preview manually to the Genie minified extension.js and package.json files."

I tried it in my installation, but it did not work. Thanks!

@wizardlyluke Would you please share some details about how to do this: "You could also add gpt-4-1106-preview manually to the Genie minified extension.js and package.json files."

I tried it in my installation, but it did not work. Thanks!

Hey @xmjiao, you can try these steps below.

  1. In extension.js, locate the model definitions object and add a new entry for gpt-4-1106-preview to avoid errors when selected.
  2. Include this new model in the package.json to enable selection from the settings.
  3. Execute Restart extension host followed by Reload window in VS Code.
  4. If settings don't reflect the change, bump the extension version in package.json and .vsixmanifest to 0.0.8-1, repeat step 3, then revert to 0.0.8 and perform step 3 again. There may be a better way to do this such as disabling and re-enabling the extension but I haven't tried.

@wizardlyluke Great. Thanks for the instruction!

Your instructions worked well. I should add that you have to choose the correct extensions folder depending on whether you're using WSL2/Remote (Linux home folder) or non-WSL (Windows home folder). For VSCode via WSL2 remote host (as I prefer bash over powershell for the Terminal tab) it was located in ~/.vscode-server/extensions/genieai.chatgpt-vscode-0.0.8 which you can access outside WSL2 via UNC path, using \\wsl.localhost\ubuntu\home\username\.vscode-server\extensions\genieai.chatgpt-vscode-0.0.8\ ... Please note, this is only if you're using WSL2

"Restart extension" is a bit unclear, it didn't work so I quit and restarted VSCode. I tried a few things (and forgot to write down what I did), but you definitely do not want to "Reinstall Extension" since it reloads from the store, overwriting the changes made to the settings files.

When editing extension.js you want to Ctrl+F and search for "gpt-4" and change

"gpt-4":{maxTokens:8192,version:"gpt-4",type:"chat"},"gpt-4-0314":{maxTokens:8192,version:"gpt-4",type:"chat"},

into:

"gpt-4":{maxTokens:8192,version:"gpt-4",type:"chat"},"gpt-4-1106-preview":{maxTokens:4096,version:"gpt-4",type:"chat"},"gpt-4-0314":{maxTokens:8192,version:"gpt-4",type:"chat"},

EDIT: Fixed the token count. Previous GPT4 was combo (input+output) tokens, while GPT4-Turbo is output tokens only (it can accept up to 128K input tokens).

Until there's something superior, Genie has been performing pretty well as a AI pair programmer.

@mdrejhon Thanks for sharing. It seems that you want to set maxTokens for "gpt-4-1106-preview" (a.k.a. GPT-4 Turbo) to be 4095, which is the maximum token size for "gpt-4-1106-preview" on OpenAI PlayGround. See the screenshot below:
Screenshot 2023-11-16 at 3 52 43 PM

This is the limit on the output tokens for GPT-4 Turbo. The context window of GPT-4 Turbo is indeed 128K tokens. However, unlike other models like GPT-4, it seems that maxTokens for "gpt-4-1106-preview" limits its output size instead of input+out size. Even if you set maxTokens to 4095 for "gpt-4-1106-preview" in either OpenAI Playground or Genie AI, you can have a long input with up to 128K tokens. (This difference does not seem to be documented anywhere and it was just my observation.)

Thanks for the correction. Confusion between input tokens versus output tokens.

For all the outright Linux distro folks out there, the extension.js can be found under ~/.vscode/extensions/genieai.chatgpt-vscode-0.0.8/out/extension.js from home folder.

Would any one in this thread me interested in maintaining a fork? I can contribute, i am just not advanced enough to own it.

Would any one in this thread me interested in maintaining a fork? I can contribute, i am just not advanced enough to own it.

Interesting suggestions. I was thinking about the same.

This repo only contains a README file and documentation without any source code. There is no point to fork this repo.

This project is supposed to be a fork of the open-source project https://github.com/gencay/vscode-chatgpt, but the author decided to make the fork a closed-source project despite the original ISC license.

Another truly open-source fork is https://github.com/Christopher-Hayes/vscode-chatgpt-reborn
It does not yet support GPT-4 Turbo. I think interested parties should consider contributing to that fork.

Hi everyone - thanks for the patience. The new models are now available in the latest version https://marketplace.visualstudio.com/items?itemName=genieai.chatgpt-vscode

Thank you!