#How to include script-specific info in ChatGPT's response when triggering a script via VA PE?

1 messages · Page 1 of 1 (latest)

hollow stag
#

I want to trigger a script via a voice command using Home Assistant Voice PE with a ChatGPT-based pipeline.

Ideally, ChatGPT should respond in a friendly way, confirming that the script is about to be executed, and also include some context-specific information related to the script itself.

Example:
The script starts my coffee machine.
Currently, the script uses TTS to say: "Please place a cup!"
Then ChatGPT says something like: "Alright, I'm making your coffee. Enjoy!"

The problem:
The spoken TTS message comes from the script, while ChatGPT replies afterwards — this feels unnatural and sometimes overlaps.

What I’m looking for is a way to have ChatGPT itself deliver the entire response (including the helpful info), while the script silently handles the background actions (e.g., delays, service calls, etc.).

So ideally, I’d like to pass a prompt or instruction from the script to ChatGPT when the script is triggered. Is that possible?

Thanks for any ideas or workarounds!

raven edge
#

heres a little example

#
  - action: conversation.process
    metadata: {}
    data:
      agent_id: >-
        conversation.hf_co_lucy_in_the_sky_qwen2_5_14b_instruct_abliterated_v2_q4_k_m_gguf_2
      text: >-
        create a message that tells the user that they should ensure a cup is
        placed in the cofee machine then add a joke about making cofee
    response_variable: response
  - action: assist_satellite.announce
    metadata: {}
    data:
      message: "'{{ response.response.speech.plain.speech }}'"
      preannounce: true
    target:
      entity_id: assist_satellite.mk_room_voice_assist_satellite
alias: example notification
description: ""
#

obviously you will need to change your conversation id and assist sattelite entities but hopefully gives you the idea

#

depending on how chatgpt formats response you might need to adjust a few things too but hopefully you get the concept i am driving at

hollow stag
raven edge
hollow stag
raven edge
#

yup, i have a few fun ones