jekalmin / extended_openai_conversation

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

Is it possible to pass identification information to a script? #233

Open nirnachmani opened 1 week ago

nirnachmani commented 1 week ago

First, thank you for your work.

I would like to use extended openai conversation to start a script and pass to the script identification information of the assistant device which is used to issue the command (e.g. assistant ID or area).

One way of doing it could be by creating several instances of extended openai conversation and assist pipelines, one for each assistant, with hardcoded information to pass to the script (e.g. "livingroom_assistant"). I am not sure how to implement that within a spec though so it is sent as a variable to a script.

A more efficient way would be to include some preexisting identification variables which are automatically generated when using an assistant, but I don't know if this is available, and if it is, how to implement it.

The purpose of this would be, for example, the ability to ask the assistant to start a timer and then run a script which will show the timer countdown and/or inform that the timer is finished on a particular device. That way, if start the timer via a voice command on the kitchen tablet, the kitchen tablets can show the timer and announce it has ended but if I do it in the office, the office esp32-box3 is used.