redevrx / chat_gpt_sdk

Flutter ChatGPT
https://pub.dev/packages/chat_gpt_sdk
MIT License
307 stars 157 forks source link

Getting this error even if i provide the token #4

Closed kahdichienja closed 1 year ago

kahdichienja commented 1 year ago

have Error [401] => Data: {error: {message: You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://beta.openai.com., type: invalid_request_error, param: null, code: null}}

redevrx commented 1 year ago

Your Token have problem you can get new token for solve this problem. get token

Princewil commented 1 year ago

I'm still having the issue.

Hang on a bit, must I pay for the token to work on my app? I mean, will token from a free account work?

redevrx commented 1 year ago

You have error Log

Princewil commented 1 year ago

Yeah, it says just like what @kahdichienja posted

Princewil commented 1 year ago

I have generated new token about three times yet says same thing

redevrx commented 1 year ago

In case I with this issue I create new token and it works , your may be problem limit ,your push code to me.

Princewil commented 1 year ago

https://github.com/iampawan/ChatGPT-Flutter-AIChatBot

Princewil commented 1 year ago

This the repo I used. I only just changed the Chatgpt package used to yours on the pubspec.yamal

Princewil commented 1 year ago

Pls check it out and find out

redevrx commented 1 year ago

Pls check it out and find out

your can geneate token give me ?

Princewil commented 1 year ago

Doing that right away

Princewil commented 1 year ago

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

redevrx commented 1 year ago

you can my live here: https://youtu.be/mcr-ErvqyzU