Guest User

Untitled

a guest
Nov 14th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.32 KB | None | 0 0
  1. alias: Refine play request
  2. sequence:
  3.   - data:
  4.       agent_id: conversation.llama3_2
  5.       text: >-
  6.         Parse following user play prompt and return the type (music, movie or
  7.         show). If it's not explicitly given, assume it's music type. If prompt
  8.         includes room name, add it into response as "area" field. If it's music
  9.         - then also return artist, album and track, if it's possible, otherwise
  10.         don't include that fields in your response. If it's video, return its
  11.         title. Format your response as JSON, omit unnecessary wrapping symbols.
  12.         Prompt is: "{{ f_prompt }}"
  13.     response_variable: processed
  14.     action: conversation.process
  15.   - variables:
  16.       json_data: "{{ processed.response.speech.plain.speech | from_json }}"
  17.   - variables:
  18.       result:
  19.         type: "{{ json_data.type }}"
  20.         artist: "{{ iif(json_data.artist, json_data.artist, None) }}"
  21.         album: "{{ iif(json_data.album, json_data.album, None) }}"
  22.         track: "{{ iif(json_data.track, json_data.track, None) }}"
  23.         title: "{{ iif(json_data.title, json_data.title, None) }}"
  24.         area: "{{ iif(json_data.area, json_data.area, None) }}"
  25.   - stop: Result
  26.     response_variable: result
  27. fields:
  28.   f_prompt:
  29.     selector:
  30.       text: null
  31.     name: Prompt
  32.     required: true
  33. description: ""
Advertisement
Add Comment
Please, Sign In to add comment