Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Refine play request
- sequence:
- - data:
- agent_id: conversation.llama3_2
- text: >-
- Parse following user play prompt and return the type (music, movie or
- show). If it's not explicitly given, assume it's music type. If prompt
- includes room name, add it into response as "area" field. If it's music
- - then also return artist, album and track, if it's possible, otherwise
- don't include that fields in your response. If it's video, return its
- title. Format your response as JSON, omit unnecessary wrapping symbols.
- Prompt is: "{{ f_prompt }}"
- response_variable: processed
- action: conversation.process
- - variables:
- json_data: "{{ processed.response.speech.plain.speech | from_json }}"
- - variables:
- result:
- type: "{{ json_data.type }}"
- artist: "{{ iif(json_data.artist, json_data.artist, None) }}"
- album: "{{ iif(json_data.album, json_data.album, None) }}"
- track: "{{ iif(json_data.track, json_data.track, None) }}"
- title: "{{ iif(json_data.title, json_data.title, None) }}"
- area: "{{ iif(json_data.area, json_data.area, None) }}"
- - stop: Result
- response_variable: result
- fields:
- f_prompt:
- selector:
- text: null
- name: Prompt
- required: true
- description: ""
Advertisement
Add Comment
Please, Sign In to add comment