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

update interactionModels for string intents #181

Merged

Conversation

FreddyTheNut
Copy link
Contributor

This addresses the issues #177 and #178

The slot-type AMAZON.SearchQuery can no longer use a space as the carrier phrase. When attempting to import or update an interaction model, the following error message is thrown:
Sample utterance " {Strings}" in intent "String" must include a carrier phrase. Sample intent utterances with phrase types cannot consist of only slots.

The cause of this error is the following code:
{ "name": "String", "slots": [ { "name": "Strings", "type": "AMAZON.SearchQuery" } ], "samples": [ " {Strings}" ] }.

A comment from @marloncarvalho #177 (comment) suggests adding a word before {Strings} resulting to:
{ "name": "String", "slots": [ { "name": "Strings", "type": "AMAZON.SearchQuery" } ], "samples": [ "hi {Strings}" ] }

However, this workaround has the downside of only recognizing a ResponseString with the added word.

To address this issue, the slot-type AMAZON.Person can be used instead. For now, this slot-type does not require a carrier phrase in the samples, which fixes the problems described.

@FreddyTheNut
Copy link
Contributor Author

I tested this approach with the English and German interaction models.
Although it might sound like using AMAZON.Person instead of AMAZON.SearchQuery may break long string recognition, I was still able to communicate full sentences and the Alexa skill matched the response types with the associated values for Home Assistant.

@DEADSEC-SECURITY DEADSEC-SECURITY merged commit c071bcd into keatontaylor:master May 6, 2023
DEADSEC-SECURITY added a commit that referenced this pull request Jul 3, 2023
* 149 use pydantic for ha state management should make code more readable (#151)

* Possible fix

* Made it more readable

* Now able to supress Okay

* Using pydantic to manage ha states

* Fixed string to bool bug

* Fixed get_ha_state bug

* Update requirements.txt

* Create codeql.yml (#172)

* Add spanish locale (#173)

* update interactionModels for string intents (#181)

* add home-assistant-configutation.yaml configurations to repository. (#190)

---------

Co-authored-by: jgarmar <6642578+jgarmar@users.noreply.github.com>
Co-authored-by: FreddyTheNut <f.erdnuess@gmail.com>
Co-authored-by: Robert Wunsch <wunsch@adobe.com>
DEADSEC-SECURITY added a commit that referenced this pull request Jul 3, 2023
* 149 use pydantic for ha state management should make code more readable (#151)

* Possible fix

* Made it more readable

* Now able to supress Okay

* Using pydantic to manage ha states

* Fixed string to bool bug

* Fixed get_ha_state bug

* Update requirements.txt

* Create codeql.yml (#172)

* Add spanish locale (#173)

* update interactionModels for string intents (#181)

* add home-assistant-configutation.yaml configurations to repository. (#190)

---------

Co-authored-by: jgarmar <6642578+jgarmar@users.noreply.github.com>
Co-authored-by: FreddyTheNut <f.erdnuess@gmail.com>
Co-authored-by: Robert Wunsch <wunsch@adobe.com>
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 this pull request may close these issues.

[Bug]: Error loading json skill-package en.us.json Problem to Import Model
2 participants