jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help building spotcast function

Xornop opened this issue · comments

when i add any

  • spec
    Line to the functions field, the LLM is not responding and just says the error
    Something went wrong: failed to load functions. Verify functions are valid in a yaml format
    I am adding a function from your examples and that even gives the error, making me think its not my own code.

Thanks for reporting an issue.
Could you share a full yaml of functions?

Closed this issue. I found my indentation error.

@Xornop i also try to integrate a function for spotcast, Can you share details of yours?

- spec:
    name: play_spotify
    description: Play Spotify on a device
  function:
    type: script
    sequence:
      - choose:
          - conditions:
              - condition: state
                entity_id: media_player.spotify_user1
                state: paused
            sequence:
              - service: spotcast.start
                data:
                  force_playback: true
                  random_song: true
                  repeat: context
                  shuffle: true
                  offset: 0
                  ignore_fully_played: false
                  account: user1
                  device_name: Chromecast
          - conditions:
              - condition: state
                entity_id: media_player.spotify_user1
                state: playing
            sequence:
              - service: media_player.media_pause
                target:
                  entity_id: media_player.spotify_user1
                data: {}

@sajov