Open reisueber opened 3 weeks ago
same applies for Google Generative AI. TBH - I don't think, that there's a solution for this, because no one will probably know what different error messages might come from the different AI providers.
So, catching them, will nearly be impossible - and even if... there should still be some kind of way to show them to the user.,... or?
In my case the whole json object was send. I think it could be possible to check if there are special characters or error numbers like 400 or 500 in the return string. Maybe it is easy possible to tell Open AI: don't return any error messages.
The problem
I just tested the new AI feature. I noticed that if the voice input is incomplete and ChatGPT then throws an error, the entire error message is played via the ESP32-S3-Box-3.![IMG_4604](https://github.com/home-assistant/core/assets/35530826/401b858c-c3a2-4141-820d-f1cde515b2b9)
What version of Home Assistant Core has the issue?
core-2024.6.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Open AI
Link to integration documentation on our website
No response
Diagnostics information
Sorry, I had a problem talking to OpenAI: Error code: 429 - {'error': {'message': 'Rate limit reached for gpt-4o in organization org-LR4Ni7ys7CRL1xunGpf19y7E on tokens per min (TPM): Limit 30000, Used 28121, Requested 8705. Please try again in 13.652s. Visit https://platform.openai.com/account/rate-limits to learn more.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response