You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I never had a problem with OpenAI as provider, but I recently switched to Gemini and now I get this error - but only like half of the time. Sometimes it works as it should, sometimes I get this error. I tried various things, ie changing the image entity to a static local file and changing some other settings. Nothing helped.
Any help would be appreciated.
Version:
1.3.1
Service Call
data:
provider: 01JBPX5M0TXYBYE9C9NVZ3BWWC
include_filename: true
detail: high
max_tokens: 100
temperature: 0.6
message: >-
Describe what you see
model: gemini-1.5-flash
target_width: 1280
image_entity:
- camera.yi_hack_a2_55e948_motion_detection_cam
response_variable: response
action: llmvision.image_analyzer
Logs
Error executing script. Unexpected error for if at pos 5: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llmvision/init.py", line 268, in image_analyzer
response = await client.make_request(call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llmvision/request_handlers.py", line 130, in make_request
response_text = await self.google(model=model, api_key=api_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llmvision/request_handlers.py", line 312, in google
"content").get("parts")[0].get("text")
^^^
AttributeError: 'NoneType' object has no attribute 'get'
The text was updated successfully, but these errors were encountered:
Bug Description
I never had a problem with OpenAI as provider, but I recently switched to Gemini and now I get this error - but only like half of the time. Sometimes it works as it should, sometimes I get this error. I tried various things, ie changing the image entity to a static local file and changing some other settings. Nothing helped.
Any help would be appreciated.
Version:
1.3.1
Service Call
data:
provider: 01JBPX5M0TXYBYE9C9NVZ3BWWC
include_filename: true
detail: high
max_tokens: 100
temperature: 0.6
message: >-
Describe what you see
model: gemini-1.5-flash
target_width: 1280
image_entity:
- camera.yi_hack_a2_55e948_motion_detection_cam
response_variable: response
action: llmvision.image_analyzer
Logs
Error executing script. Unexpected error for if at pos 5: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llmvision/init.py", line 268, in image_analyzer
response = await client.make_request(call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llmvision/request_handlers.py", line 130, in make_request
response_text = await self.google(model=model, api_key=api_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llmvision/request_handlers.py", line 312, in google
"content").get("parts")[0].get("text")
^^^
AttributeError: 'NoneType' object has no attribute 'get'
The text was updated successfully, but these errors were encountered: