home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.71k stars 28.87k forks source link

Detected blocking call to open inside the event loop by integration 'openai_conversation' #119498

Closed fredericks1982 closed 1 day ago

fredericks1982 commented 2 weeks ago

The problem

I'm opening this tool since I get an error and the log message says "please create a bug report" 😇

When I try to use a ChatGPT-powered instance of assist, I always get the frontend error message:

"Sorry, I had a problem talking to OpenAI: Error code: 404 - 
{'error': {'message': 'The model `gpt-4o` does not exist or you do not have access to it.', 
'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}". 

I tried also with ChatGPT 3-5 Turbo, but the message is the same:

Sorry, I had a problem talking to OpenAI: Error code: 404 - 
{'error': {'message': 'The model `gpt-4-turbo` does not exist or you do not have access to it.', 
'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

This happens even if I'm a paying subscriber of ChatGPT and I just created a new API token just for HA.

This is my integration configuration:

image

What version of Home Assistant Core has the issue?

core-2024.6.1

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

OpenAI Conversation

Link to integration documentation on our website

https://www.home-assistant.io/integrations/openai_conversation/

Diagnostics information

home-assistant_openai_conversation_2024-06-12T12-55-27.958Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 weeks ago

Hey there @balloob, mind taking a look at this issue as it has been labeled with an integration (openai_conversation) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `openai_conversation` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign openai_conversation` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


openai_conversation documentation openai_conversation source (message by IssueLinks)

balloob commented 2 weeks ago

The blocking call is an issue upstream and is being tracked at https://github.com/openai/openai-python/issues/1446

camedomotic-unofficial commented 2 weeks ago

Thanks @balloob! Is there some workaround we can use so to be able to use this integration, or are we required to wait until the upstream bug is fixed?

balloob commented 2 weeks ago

It's just a warning and can be safely ignored

LoekVieze commented 1 week ago

getting the same error, really frustrating fiew days ago it workt fine. I also have a problems with an other hacs repositories extended plug in. also work byfore but know I cant vind ore dowload it.