Google Generative AI - Remove uploaded file after processing using files.delete

Description of Google Generative AI integration states

“The major differences include: the free of charge plan is rate limited, and free prompts/responses are used for product improvement.”

Especially for Any files or images we upload these may very well contain privacy related material.
The Google Gemini API documents describe the files.delete functionality : Using files  |  Gemini API  |  Google AI for Developers

Since HA is quite privacy focussed, it would suit to include the option to add automatic deletion of the uploaded files after receiving the response. Not saying it will keep from being used for training, but at least it will be removed asap.

Action could then look like this:

action: google_generative_ai_conversation.generate_content
data:
  prompt: >-
    Very briefly describe what you see in this image from my doorbell camera.
    Your message needs to be short to fit in a phone notification. Don't
    describe stationary objects or buildings.
  filenames: /tmp/doorbell_snapshot.jpg
  delete_after_process: true
response_variable: generated_content

OR

action: google_generative_ai_conversation.deletefiles
data:
  filenames: files/doorbell_snapshot.jpg
response_variable: results

Thats good to know, but there giving all of this for free, let em see what the uber eats guy looks like for free. lol

now had this been an overseas company and not google id be more concerned. Google giving this for free has pushed the idea on other makers to offer a free tier as well, the next gpt will be free as well :slight_smile:

Well, for me, Google is overseas :wink:

And i sure appreciate the effort and them making it free, but that doesnt mean I want to give them insight on everything.
But thats also mainly why I wanted it optional; so you can chose which information stays where and when.
And as most of the Google models have contextual awareness, you can send multiple questions over the uploaded content without resending it, some usecases might need the data to remain.

New info; Currently Data uploaded to the AI over API is removed after 2 days already; so this option mainly improves the timing.