Closed sayam93 closed 2 months ago
Seems like it is not passing response_variable: query_response to the script. Help!
This error is usually caused by an error when indenting the YAML code.
There's a minor indentation error in the play_music
section's parameter definition. Specifically, the - required:
section is misindented. In the YAML format, the required
list should be at the same level as properties
, directly under parameters
. Also, there's a typo in the parameter name: it should be media_player
instead of mass_media_player
, based on common naming in Home Assistant for media playback devices. Here's the corrected version:
- spec:
name: play_music
description: Use this function to play music on a certain media player
parameters:
type: object
properties:
music_query:
type: string
description: The artist, album, or type of music to play
media_player:
type: string
description: The Music Assistant compatible media player's full entity id. The correct value starts with "media_player".
required:
- music_query
- media_player
function:
type: script
sequence:
- service: script.play_music
data:
music_query: '{{music_query}}'
media_player: '{{media_player}}'
This ensures that the required
list is correctly indented and that the name of the media player is correctly specified.
It worked like a charm.. Thanks!
This error is usually caused by an error when indenting the YAML code.
There's a minor indentation error in the
play_music
section's parameter definition. Specifically, the- required:
section is misindented. In the YAML format, therequired
list should be at the same level asproperties
, directly underparameters
. Also, there's a typo in the parameter name: it should bemedia_player
instead ofmass_media_player
, based on common naming in Home Assistant for media playback devices. Here's the corrected version:- spec: name: play_music description: Use this function to play music on a certain media player parameters: type: object properties: music_query: type: string description: The artist, album, or type of music to play media_player: type: string description: The Music Assistant compatible media player's full entity id. The correct value starts with "media_player". required: - music_query - media_player function: type: script sequence: - service: script.play_music data: music_query: '{{music_query}}' media_player: '{{media_player}}'
This ensures that the
required
list is correctly indented and that the name of the media player is correctly specified.
The problem
I am using Extended Open AI Conversation as my conversation agent in an assist pipeline with STT and TTS being handled by Home Assistant Cloud.
I also have music assistant server and integration installed and running along with a custom function in Extended Open AI Conversation with gpt-3.5-turbo-1106 model and a 20000 token context window with the following prompt:
Function:
Script:
Every time I make a query saying play (track name), I get "Unexpected error during intent recognition".
What version of Home Assistant Core has the issue?
core-2024.4.0
What type of installation are you running?
Home Assistant Container
Anything in the logs that might be useful for us?
Additional information
From pipeline debug