timkmecl / chatgpt-vscode

VSCode extension that allows you to use ChatGPT or GPT4 inside the IDE
331 stars 81 forks source link

ChatGPT repies with How Can I help you today? #26

Open girls-whocode opened 1 year ago

girls-whocode commented 1 year ago

I have a paid account, I am using GPT 3.5 turbo, I have installed the latest version from the MarketPlace. If I do small amounts of code such as:

    getAllData: async function () {
      this.isLoading = true
      let data = await import('@/assets/data/data.json')
      this.billsTable(data)
      this.widgets(data)
      this.isLoading = false
    },

It works fine, although if I have it write a document for the entire code, it just returns:

Hello! How can I assist you today?

Is there a line or character limit? Is there a way to remove this limit?

timkmecl commented 1 year ago

Hi, there is a 4000 token limit, which is about 3000 words, probably a bit less for code. So if the request is longer than that, it doesn't get through. This is set by OpenAI so there is no way to get around it.

I will probably add some warning about that to the extension in the future.

girls-whocode commented 1 year ago

That makes sense, thank you for letting me know

girls-whocode commented 1 year ago

Do you minimize the code when submitting? Like removing comments, spaces, tabs, etc... I guess with some JavaScript, if the line doesn't have a ; at the end, that would probably have to be added maybe I just answered my own question

timkmecl commented 1 year ago

No, the code is not minimised. It would probably save some tokens and allow for longer inputs, but since tokens are more related to words than to characters the difference would not be huge, moreover the code inside the response from the AI would then also be minimised which is not really something we would want.