zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.44k stars 3.02k forks source link

ChatGPT doesn't work in Ubuntu 22.04 #14441

Open antonr-p2p opened 3 months ago

antonr-p2p commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Installed Zed and pasted my OpenAI key with works fine with VSC+CodeGPT. It shows me System/Default/You options, but any message I send I get empty answer.

Environment

Zed: v0.143.7 (Zed) OS: Linux X11 ubuntu 22.04 Memory: 62.5 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

image

If applicable, attach your Zed.log file to this issue.

Zed.log


SomeoneToIgnore commented 3 months ago

Can you hover those X marks and show that the error messages are?

antonr-p2p commented 3 months ago

@SomeoneToIgnore it says "Failed to connect to OpenAI API: The model gpt-4o does not exist or you don't have access to". It's interesting that for model gpt-3.5-turbo it says that I have exceeded limit (so it actually connects, but doesn't work as well). Tried from different countries via VPN, originally located in Indonesia.

antonr-p2p commented 3 months ago

BTW, can it be because my OpenAI API key is in form of sk-proj-xxx, not sk-xxx ?

adamfrank321 commented 3 months ago

New API key. Fresh Zed install. Resetting my key and entering a new one gives the same result.

With 3.5-turbo selected, I get this message... ss-20240715-165714

With any of the 4's selected I get this... ss-20240715-165953

isosphere commented 3 months ago

There might be a confusion here with OpenAI's service. I'm paying for ChatGPT Plus, but it appears that this does not include tokens for API queries. It took me a moment to determine that the above error was accurate for me.

@antonr-p2p, @adamfrank321 can you check that you can execute queries here: https://platform.openai.com/playground/ ?

If you're in the same boat as me, you'll get a similar error direct from OpenAI.

antonr-p2p commented 3 months ago

@isosphere my bad, sorry. I had just realized that it's not sufficient to buy an OpenAI ChatGPT subscription for my user, but I need a top up additional credits to use API key. I missed this cause CodeGPT in VSCode was working via trial CodeGPT plus subscription and had never used my key actually.

So, yep, now it works. @adamfrank321 can please also check if you have positive balance for using API key?