ChatBot Component isn't working (using own API Key from OpenAI)

When I try to use the ChatBot component with my own API key, it has never worked! Here is my code and a view from the designer

Screen Shot 2024-03-30 at 7.31.36 PM

image

Please help thanks!

What is the error you receive?

error 4200

it says i have exceeded my current quota but my api usage according to openAI is 0!

which means i haven't even used this API key once, but the error is still showing up

My only assumptions apart from a bug are that you're either setting the API key to something else programmatically, or you're calling the wrong function (seeing as how you might have more than one ChatBot components).

Actually I found this thread that had been closed a while ago

This is the exact problem I have been facing

Could the MIT guys please help?

While you are waiting @arjun for a Chatbot solution you could

  • try this extension [F/OS] 🧠 Artificial Intelligence and OpenAI! using YOUR openAI api key.

  • post the code blocks you are using so someone can see what you are doing. You showed what you use with Chatbot2 ; perhaps using two components in the same project as you might cause issues as @NishyanthKumar suggested. Start with a new Project and try your code again.

  • this code works with the MIT Chatbot component just now using the default MIT parameters .


You can try it and tell us if it works for you too. :smile:
Enter the code yourself or try
ChatBotTesting.aia (2.2 KB) :wink:

Does openAI work using the default code?

1 Like

Do you have billing set up and a credit balance on the account? The error you are receiving about insufficient quota is from OpenAI and not us.

So OpenAI gives $5 free right? That's what I have been trying to use but it doesn't work

Probably not as simple as that. Do you have a credit card on file and did you authorize a limit? Where does openai say that you get 5$ of usage free?

I found this. I recommend you visit the 'your billing settings' link and' usage tracking dashboard' and see what it says about your account. Start a conversation with openai .to discuss your issue.

Did you try the things mentioned above? and still did not get the ai to work?

  • How can I manage my spending? (from the openAi site)

You can set a monthly budget in your billing settings, after which we’ll stop serving your requests. There may be a delay in enforcing the limit, and you are responsible for any overage incurred. You can also configure an email notification threshold to receive an email alert once you cross that threshold each month. We recommend checking your usage tracking dashboard regularly to monitor your spend.

2 Likes

Thank you! Once I put some money into my account it started to work.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.