yanxiaodi / vs-code-revision

ReVision is a VSCode extension that allows you to quickly and easily revise your written work using OpenAI or Azure OpenAI.
MIT License
10 stars 2 forks source link

Error occurs. Error: Request failed with status code 400 #2

Open tapyu opened 1 year ago

tapyu commented 1 year ago

When I try to revise my code (alt+shift+R), reVision prompts this error... How to solve it?

My JSON settings is

// Revision OpenAI settings
    "revision.writingStyle": "formal",
    "revision.targetLanguage": "English",
    "revision.sourceLanguage": "English",
    "revision.maxTokens": "1500"

revision.openAIApiKey was omitted.

Machine settings

 tapyu@tapyu-Inspiron-5570
 OS: Ubuntu 22.04 jammy
 Kernel: x86_64 Linux 5.19.0-40-generic
 Uptime: 50m
 Packages: 2459
 Shell: zsh 5.8.1
 Resolution: 1366x768
 DE: GNOME 41.7
 WM: Mutter
 WM Theme: 
 GTK Theme: Yaru-dark [GTK2/3]
 Icon Theme: Yaru
 Font: Ubuntu 11
 Disk: 108G / 469G (25%)
 CPU: Intel Core i5-8250U @ 8x 3.4GHz [60.0°C]
 GPU: Intel Corporation UHD Graphics 620 (rev 07)
 RAM: 1867MiB / 2288MiB
yanxiaodi commented 1 year ago

Hi @tapyu , ReVision is not designed to revise the code. Instead, it is used to revise the writing work, such as a blog, an article, a sentence, etc. Also, you need to set the OpenAPIKey, otherwise it won't work. You can register an account here: https://platform.openai.com/account/api-keys. Thanks.