Script to send a prompt to Assist Bard

I’d like to write a script to send a text prompt to Assist (via the Google Generative AI Conversation Integration / Google Bard) then receive the response to a sensor. Is this possible?

I believe I would need to perform a service call to the Assist/Speech engine, but it’s not a drop down menu option when I create automations or scripts with the Home Assistant editor.

Any and all help welcome! Thanks in advance.

This will be possible in 2023.7. See my reply to your feature request at 'Assist' Voice Assistant as a Service-Call - #5 by tronikos

Hi … News regarding the possibility of integrating Bard into Home Assistant?

Yes, this is indeed possible with 2023.7! I have been using PaLM extensively in scripts and automations with post processing. Reference the release notes and my post here.