Closed LORE-D-NATO closed 9 months ago
Dude beware you leaked your openai api key
Hey @LORE-D-NATO, thanks for reporting! I'm wondering whether this has something to do with Zed not having access to the key chain. Once you've added the key, does Zed and the key show up in Keychain Access
?
Keychain Access.app
api.openai.com
(this is (1) in the screenshot)Hey, @mrnugget, I'm having the same issue, I did what you mention and everything is there as expected.
The assistant on my machine also didn't work for some reason, but after resetting the key using assistant: reset key
, it's working now.
I think I wasn't able to save the key with assistant: reset key
, I insert it, then I click the button to close the assistant, and when I reopen it it's the same window with the key inserted but I cannot open the assistant chat itself, and upon restart the key does not seem to be saved.
Edit: my bad, hitting Enter closes it and goes to the assistant chat but the key is still not saved.
@mrnugget My keychain looks right. I fixed my issue by generating a new API key -- for some reason a key I generated before adding credits wasn't able to make calls. Thanks!
I don't even have assistant: reset key
in my installation, version 0.119.19.
@aalin yeah, that's a bug: the assistant: reset key
only shows up when you have the assistant window focused.
@NicolayD so it still doesn't work, right? Can you provide some exact steps to reproduce?
@NicolayD so it still doesn't work, right? Can you provide some exact steps to reproduce?
Actually, I'm not sure how, but it's working now. But there are still several bugs, I think.
I am opening the assistant window, opening the command panel and selecting the assistant: reset key
command (it works as you mentioned above), then clicking Enter. I get redirected to the assistant, but if I write something and press Shift-Enter
, nothing happens. I have to click the Assist
button on top. That way it answers. I'm not sure what changed as I did try this yesterday too. Aside from that though:
Assist
button doesn't work - it should be Cmd-Enter
according to the pop-up hint but that or even Cmd-Shift-Enter
does nothing. Enter
. Closing and reopening the panel still show the reset key window and pressing Enter
without inputting a key does nothing.the Close Right Dock
button (Cmd-R) doesn't work - I tried Cmd-R
and Cmd-Shift-R
.
I might be missing something or doing something wrong though, I'll look through the docs again.
One more thing I'm wondering about is if there's a way to delete conversations, but that might be better fit for a different issue.
Actually, I'm not sure how, but it's working now. But there are still several bugs, I think.
Is this maybe related to this?
https://github.com/zed-industries/zed/issues/6719#issuecomment-1911993130
(FWIW: we're aware that we need to make the whole UX and flow around setting the API key a lot better! I don't want anyone to think I'm coming up with excuses for this flow)
but if I write something and press Shift-Enter, nothing happens. I have to click the Assist button on top. T
Hmmm, the official keybinding is Cmd-enter
. But that also doesn't work? Can you reproduce this with the key setup correctly?
Actually, I'm not sure how, but it's working now. But there are still several bugs, I think.
Is this maybe related to this?
No, I used an old key. But I also had a similar issue on my personal computer and I'll check later if it works there too.
(FWIW: we're aware that we need to make the whole UX and flow around setting the API key a lot better! I don't want anyone to think I'm coming up with excuses for this flow)
You guys are amazing, I already love the app, it's great! I hope I didn't sound too critical, but I was just trying to give feedback. :) And the fact that you're so responsive is honestly unbelievable, after all the publicity in the last few days. Thanks for everything you're doing.
but if I write something and press Shift-Enter, nothing happens. I have to click the Assist button on top. T
Hmmm, the official keybinding is
Cmd-enter
. But that also doesn't work? Can you reproduce this with the key setup correctly?
Yeah, that worked! Thanks, I thought I tried and had an issue with it but I was probably mixing things up, sorry about that.
I'm experiencing this issue as well. I checked my Keychain and I just generated a new key today. This is a fresh install of Zed. Is there any more information I can provide to help resolve this issue?
@noah-troncoso did you add credits to your OpenAI platform account? That's the thing that I ran into when I first tried to use it.
Hey @mrnugget @mikaelsouza, I've managed to get the cmd + Enter
on the assistant to work now! I had to...
cmd + shift + p > assistant: reset key
by focusing on the assistants panelAppreciate everyone's help here!
Hey @mrnugget @mikaelsouza, I've managed to get the
cmd + Enter
on the assistant to work now! I had to...
- Generate a new API key, add some credits
- Run
cmd + shift + p > assistant: reset key
by focusing on the assistants panel- Restart Zed!
Appreciate everyone's help here!
It worked, Thank you @multipletwigs
FWIW I updated the docs https://zed.dev/docs/assistant-panel. We still need to fix that the action doesn't show up when the panel isn't focused.
I also just merged a PR that should fix the root problem: https://github.com/zed-industries/zed/pull/7197
Once this is released, I can revert my changes to the docs.
even when entering the API key, it doesn't work
Do you have credits on your account?
No, that was the problem! I thought it wasn't needed because I used the AI before without credits but maybe it's because I cancelled my subscription earlier. It's working with having active credits on my account. Thanks!
On Thu, 22 Feb 2024 at 16:24, Thorsten Ball @.***> wrote:
Do you have credits on your account?
— Reply to this email directly, view it on GitHub https://github.com/zed-industries/zed/issues/6685#issuecomment-1959805409, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWQBGWCQSC5U5JSOM647EDYU5WMTAVCNFSM6AAAAABCKAB4K6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZHAYDKNBQHE . You are receiving this because you commented.Message ID: @.***>
Hi, I wonder whether it is necessary to buy credits to use the assistant if my OpenAI account is under Pay-as-you-go billing plan. I could normally call the OpenAI API, but fail to use the Zed assistant. I have tried to reset the key, but it still didn't work.
I think Pay-as-you-go means that your credits are used in a pay-as-you-go way, vs. monthly costs billed to you.
Here's a screenshot from my account:
Notice that it says Pay-as-you-go and I have credits.
The key is not recorded correctly in the keychain access app,only 'sk-' can be saved.
Oh sorry I made confusion. I was supposed to say the monthly bill. Here's a screenshot of my account:
@hsiachi can you create a new issue for that? OpenAI API access does not work with "Pending Invoice" pay-as-you-go billing
or something like that?
@hsiachi can you create a new issue for that?
OpenAI API access does not work with "Pending Invoice" pay-as-you-go billing
or something like that?
Yeah sure, it's now in #8585. Thank you so much for your help!
Check for existing issues
Describe the bug / provide steps to reproduce it
The assistant feature does not ask for an API key on a fresh install and instead
cmd+enter
doesn't do anything. Resetting the key makescmd+enter
generate an empty assistant response.https://github.com/zed-industries/zed/assets/115497894/4f6e859e-f98d-452a-b3c4-65c3dbc2ff35
Environment
Zed: v0.119.19 (Zed) OS: macOS 14.1.2 Memory: 8 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.