jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
829 stars 108 forks source link

Expose service to call AI assistant to generate message in automatisation (Feature) #205

Open jmorille opened 2 months ago

jmorille commented 2 months ago

Expose a service like the image generation, that call the AI service just for generate a message with the home context.

For coding automatisation, like a welcome message different each day. A service call permit to add some additional information like weather forecast or whatever.

I dont find in home assistant native API a service to call directly Voice Assist feature.

Stklingner commented 1 month ago

You can do this once you've set up a voice assistant entity with the following service call:

alias: "Process Command via Conversation"
sequence:
- service: conversation.process
  data_template:
    text: "{{ chat command }}"
    agent_id: <get this by calling the service under Developer Tools/Services and editing in YAML >

You can get responses as well - look at the docs for conversation!