I have a Voice Assistant using a local [Ollama] LLM through acon96/home-llm. I would like the LLM to understand “Ask Google blah”; this should cause it pass “blah” to the Google Gen AI integration (which I also have installed) and speak the response.
acon96/home-llm lets the LLM know about all of the Home Assistant intents
as tools, so I think what I need to do is write a custom intent
which takes a string parameter, passes that string parameter to google_generative_ai_conversation.generate_content
as its prompt
variable and then passes the string returned by google_generative_ai_conversation.generate_content
back to speech
as the text
variable.
Questions:
- does this seem right, or is there a simpler way (it doesn’t seem as though it should be this complex)?
- how does one create a custom
intent
? - how would I call
google_generative_ai_conversation.generate_content
withprompt
as a parameter, rather than hard-coding it?
I’ve read the documentation (e.g. concerning scripts, their syntax and intent_scripts) and posts such as this one which seem similar, but I just can’t figure out how to put it all together.