Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Error #73

Closed
squizzer73 opened this issue Jan 3, 2024 · 7 comments
Closed

Unexpected Error #73

squizzer73 opened this issue Jan 3, 2024 · 7 comments

Comments

@squizzer73
Copy link

Screenshot 2024-01-03 at 10 47 47 Hi, every time I try to set up the integration I put in a name and the key and get the "Unexpected Error" message, if I bypass authentication it creates it but then doesn't work (message about unable to parse the intent).

Any ideas on what idiotic mistake I am making :-)

Cheers
Mark.

@jekalmin
Copy link
Owner

jekalmin commented Jan 3, 2024

Is there any logs?

@squizzer73
Copy link
Author

Yep, sorry, they are below, looks like a duplicate of 62.

Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/extended_openai_conversation/config_flow.py", line 130, in async_step_user
await validate_input(self.hass, user_input)
File "/config/custom_components/extended_openai_conversation/config_flow.py", line 104, in validate_input
await validate_authentication(
File "/config/custom_components/extended_openai_conversation/helpers.py", line 154, in validate_authentication
await hass.async_add_executor_job(
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/lib/_old_api.py", line 39, in call
openai.lib._old_api.APIRemovedInV1:

You tried to access openai.Model, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

You can run openai migrate to automatically upgrade your codebase to use the 1.0.0 interface.

Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28

A detailed migration guide is available here: openai/openai-python#742

@jekalmin
Copy link
Owner

jekalmin commented Jan 3, 2024

Oh, this is the same problem with #62.
Currently, this integration is incompatible with HA-core version 2024.1.x.
Let me work on it pretty soon.
Try HA 2023.x.x versions until then.

@squizzer73
Copy link
Author

Yep, no problem, should have checked first, my bad.

@jekalmin
Copy link
Owner

jekalmin commented Jan 3, 2024

No problem!
I will comment it when it's available.

@jekalmin
Copy link
Owner

jekalmin commented Jan 3, 2024

Can you try 1.0.0-beta1?

@squizzer73
Copy link
Author

Just updated and that works fine now, thanks for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants