I’m trying to use this new service to send an image for evaluation.
If I send a static file, like this it works:
service: google_generative_ai_conversation.generate_content
data:
image_filename: /media/snapshot.png
prompt: Can you describe what you see?
But I would like to send an entity image (from Frigate), like this:
service: google_generative_ai_conversation.generate_content
data:
prompt: Can you describe what you see?
image_filename: >-
/api/image_proxy/image.exterior_person?token=xxxxxxx
And I’m getting this error:
Failed to call service google_generative_ai_conversation.generate_content. Cannot read `/api/image_proxy/image.exterior_person?token=xxxxxxx`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`
I’ve tried adding ‘/api/’, ‘/api/image_proxy/’ and the configuration ends up invalid:
Configuration errors
Invalid config for 'homeassistant' at configuration.yaml, line 53: Not a directory 'allowlist_external_dirs->0', got '/api/image_proxy/'
Is there a way for me to send an image entity in this service?
I’ve seen some people saving a snapshot through a service call and then sending the snapshot, but in the case of an entity image it is not possible.
In short, how do I send my image saved in an HA entity to this service? Thanks in advance.
You’ll need to select an image entity, then the script will download it to the configured folder, send it to Google AI and send a notification with the text generated. For a camera entity some extra modifications might be necessary