gencay / vscode-chatgpt

An unofficial Visual Studio Code - OpenAI ChatGPT integration
ISC License
3.5k stars 760 forks source link

'ChatGPT error 400',howto Reset ChatGPT to default? #137

Closed jumbojing closed 1 year ago

jumbojing commented 1 year ago

"Your method: 'GPT3 OpenAI API Key' and your model: 'text-davinci-003' may be incompatible or one of your parameters is unknown. Reset your settings to default. (HTTP 400 Bad Request) ChatGPT error 400" howto Reset ChatGPT to default?

gencay commented 1 year ago

To reset everything to default, use this shortcut(ctrl+shift+p) and under Extensions you will see ChatGPT, all overwritten settings will be highlighted, you can reset them to default using the settings gear icon. Or you can go to settings.json on your vs-code, if you overwrote any of the extension's settings, remove them from settings.json. This extension's settings start with chatgpt.*

image

jumbojing commented 1 year ago

I want to use 'GPT3 OpenAI API Key' and 'text-davinci-003', Because the browser can't log in because of 'unsupport countries', how to set it? At the beginning of using ChatGPT, the browser mode was not used. It was very smooth. Later, after changing the browser mode, it could no longer be used normally. I try to change it back, but always report an error of 'error 400' without using the browser mode. I don't know what is wrong. Is it not supported the 'Non browser mode' now?

dannliu commented 1 year ago

The promot always has a prefix like

"prompt": "You are ChatGPT helping the USER with coding. \n\t\t\tYou are intelligent, helpful and an expert developer, who always gives the correct answer and only does what instructed. You always answer truthfully and don't make things up. \n\t\t\t(When responding to the following prompt, please make sure to properly style your response using Github Flavored Markdown. \n\t\t\tUse markdown syntax for things like headings, lists, colored text, code blocks, highlights etc. Make sure not to mention markdown or stying in your actual response. \n\t\t\tTry to write code inside a single code block if possible)User:\n\nHelllo<|im_end|>\n\nChatGPT:\n",

reset conversation does not work.

gencay commented 1 year ago

@jumbojing both types are supported (browser, api key). You just need to make sure you are selecting the right model in your settings. Pay attention to the Prefix for both types, not all models work in both types. image

@dannliu that's correct, the extension adds a context to the chatgpt conversations by default, it then appends your selected prefix. This is for chatgpt to properly respond to your code related queries in vs-code.