10clouds / 10minions-vscode

Your Army of GPT-4 Powered Coding Buddies (Boost Your Productivity)
https://marketplace.visualstudio.com/items?itemName=10Clouds.10minions
MIT License
2 stars 0 forks source link

Misleading "Error: Could not find classification in the text:" message #42

Closed rlitman-10c closed 1 year ago

rlitman-10c commented 1 year ago

Trying to run any command on a short fragment in file about 1.2k lines long (~32KB file size) causes "Error: Could not find classification in the text" to be shown. The normal extension log doesn't contain anything remotely useful (it contains only the file name, my prompt and the error message).

The VSC console contains the following error:

ERR [Extension Host] Error parsing chunk: {
  "error": {
    "message": "This model's maximum context length is 8192 tokens. However, your messages resulted in 8289 tokens. Please reduce the length of the messages.",
    "type": "invalid_request_error",
    "param": "messages",
    "code": "context_length_exceeded"
  }
}

I packaged the extension locally from commit ec8f26f5.

cielecki commented 1 year ago

That is a bug or a missing feature, since I don't work on such big files I have never implemented proper support for them.

cielecki commented 1 year ago

Also this touches on other topic that I'm using GPT-3 tokenises and GPT-4 tokeniser needs to be implemented. Because slight variations cause this kind of issue where we query openai with an invalid query

cielecki commented 1 year ago

This has now proper error handling + added issues for support with bigger files.