Repository navigation
fix(system): resolver la acción por valor canónico del slot - #3
Merged
Merged
Conversation
El slot `action` de SystemIntent llegaba vacío (resolutions=None,
slot_value=None) y todo caía en "No entendí esa acción.". Ahora el
handler prioriza el valor canónico que resuelve Alexa vía el slot
type SYSTEM_ACTION_TYPE y, si no hay resolución, cae a lo hablado
mapeando sinónimos. Se agregan las formas neutras "apaga" y
"reinicia" al mapa (antes solo estaban las de voseo).
Requiere en la consola: crear SYSTEM_ACTION_TYPE (apagar/reiniciar/
bloquear con sinónimos), asignarlo al slot `action` y cambiar las
utterances literales por `{action} ...`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
"apaga la pc" (y "reinicia", "bloquea la pantalla") respondían "No entendí esa acción."
El log mostró que el slot
actiondeSystemIntentllegaba vacío:resolutions=None,slot_value=None. Dos causas en la consola:SYSTEM_ACTION_TYPE, así que el slot nunca se rellenaba.apaga el pc/reinicia el pc/bloquea la pantallaeran literales, sin{action}.Además, el handler leía
slot.value(lo hablado) en vez del valor canónico, y el mapa de sinónimos solo tenía las formas de voseo (apagá,reiniciá), no las neutras.Cambios
SystemHandlerprioriza el valor canónico resuelto por Alexa (patrón deUrlHandler); si no hay resolución, cae a lo hablado y mapea sinónimos.apagayreiniciaa_SYNONYMS.Requiere en la consola (ya hecho)
Crear
SYSTEM_ACTION_TYPE(apagar/reiniciar/bloquearcon sinónimos), asignarlo al slotaction, cambiar las utterances a{action} ...y reconstruir el modelo.