jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
834 stars 108 forks source link

problem talking to OpenAI #147

Open The-Erf opened 4 months ago

The-Erf commented 4 months ago

Hi , my log :

Sorry, I had a problem talking to OpenAI: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}

My api code is fine and I changed the load

jekalmin commented 4 months ago

Did you use paid account? It seems similar to this issue

The-Erf commented 4 months ago

Did you use paid account?

It seems similar to this issue

I am using the free trial version, yesterday I created a new user account and activated the free trial, but the problem is not solved. Do I need to pay? My openai usage in free terial is 0

jekalmin commented 4 months ago

Yes, you need credit balance to use API.

The-Erf commented 4 months ago

Yes, you need credit balance to use API.

Tnx bro🤍

marnixt commented 3 months ago

I also get something similar 2024-03-13 00:53:34.705 ERROR (MainThread) [custom_components.extended_openai_conversation] Error code: 429 - {'error': {'message': 'Rate limit reached for gpt-3.5-turbo-0125 in organization org-on tokens per min (TPM): Limit 40000, Used 39485, Requested 787. Please try again in 408ms. Visit https://platform.openai.com/account/rate-limits to learn more. You can increase your rate limit by adding a payment method to your account at https://platform.openai.com/account/billing.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}

I do have a paid account but somehow it seems to add up the tokens until the 40.000 limit is reached. It's not 40.000 per minute but 40.000 until I restart home assistant

jekalmin commented 3 months ago

@marnixt First of all, Please remove organization ID from your comment just in case. I think this is different error message from paid account.

Did you try with esphome devices? It should be reset every 5 minutes if esphome device is used.