Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intent Parsing Ignoring Required Space #193

Closed
ADHDSquir opened this issue Jan 29, 2025 · 2 comments · Fixed by #194
Closed

Intent Parsing Ignoring Required Space #193

ADHDSquir opened this issue Jan 29, 2025 · 2 comments · Fixed by #194
Assignees

Comments

@ADHDSquir
Copy link
Contributor

I have an automation for assist that looks like this (simplified for example):

triggers:
  - trigger: conversation
    command:
      - play music by {artist_name} [(in|on) [the ]{area_name}]
actions:
  - set_conversation_response: >-
      Playing music by {{ trigger.slots.artist_name }} in the {{ trigger.slots.area_name }}

When I give the command "Play music by Jason Mraz" the intent processing is splitting in the middle of the word "Jason" such that it tries to play music by "Jas" ON the area "Mraz." Similarly, "Play music by Justin Timberlake in the Office" returns "Playing music by Just in the Timberlake in the Office"

The returned (simplified) trigger data looks like:

trigger:
  platform: conversation
  sentence: Play music by Jason Mraz
  details:
    artist_name:
      name: artist_name
      text: Jas
      value: Jas
    area_name:
      name: area_name
      text: Mraz
      value: Mraz
  slots:
    artist_name: Jas
    area_name: Mraz
  user_input:
    text: Play music by Jason Mraz
    language: en
    agent_id: conversation.home_assistant

I cannot find any way to structure the sentence such that it only matches "on" or "in" when preceded by a space and not when "on" or "in" is found at the end of part of the artist's name.

@tetele
Copy link
Contributor

tetele commented Jan 29, 2025

@synesthesiam i don'r have the rights to transfer this issue to hassil

@synesthesiam synesthesiam transferred this issue from home-assistant/intents Jan 30, 2025
@synesthesiam
Copy link
Contributor

Transferred 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants