BuilderIO / ai-shell

A CLI that converts natural language to shell commands.
MIT License
4.22k stars 278 forks source link

Better handle insufficient_quota errors #6

Closed amjed-98 closed 1 year ago

amjed-98 commented 1 year ago

I'm running :

the steps to reproduce the issue

  1. run npm install -g @builder.io/ai-shell
  2. run ai-shell config set OPENAI_KEY=<API_KEY>
  3. run ai list all log files

image


update

I've tried switching to node v-16 and still rejects but with a different error message

it seem that I have exceeded my plan limit.

but it would be great to catch the error so it doesn't freeze the shell session

image

steve8708 commented 1 year ago

Thanks for the update, and great point

steve8708 commented 1 year ago

Updated the title accordingly, we should make an update to print this nicely to the end user that they have exceeded their quote (vs the current unhelpful error message)

ZeldOcarina commented 1 year ago

ha I got the point, we need to activate billing and have a payment method in place if not on the API free trial. I'll write a pull request with a brief note in the Readme!

steve8708 commented 1 year ago

Updated error handling in 0.0.18