Open MissinLinkk05551 opened 5 months ago
Tried to add your repo to HACS and install but it says Entity not available: sensor.hassio_openai_response
configuration.yml
sensor:
- platform: openai_response
api_key: "sk-proj-XXXXXXXXXXX"
input_text:
gpt_input:
name: GPT Input
Home Assistant
Core 2024.6.0 Supervisor 2024.06.0 Frontend 20240605.0
add the original then copy my manifest.json and sensor.py into the files from the original into your custom_components/openai_response folder on your Home Assistant
I tried that already but it resulted in the same problem
It seems like it does not correctly install the new version of the OpenAI dependency
ssh into Home Assistant and run the following commands
sudo su -s /bin/bash
docker ps
docker exec -it {Your Container ID} /bin/bash
source /config/.venv/bin/activate
Your prompt should look like this: (.venv) homeassistant:/config#
then run pip install openai --upgrade
deactivate
exit
.venv
did not exist for me inside /config
in the container
find / -name activate
/usr/local/lib/python3.12/venv/scripts/common/activate
so I ran pip install openai --upgrade
without activating a virtual env which ended up fixing the problem, thanks!
But sadly I ran into another problem:
openai.NotFoundError: 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'}}
and the state of hassio_openai_response
is always Unknown
Updated API call Method now working with newest Home Assistant v2024.6.0