Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
flask-ask slot is always being mapped to None

My slot for a custom intent is always being recognised as None.

I have an intents schema which looks like this:

{
    "interactionModel": {
        "languageModel": {
            "invocationName": "name_of_app",
            "intents": [
                {
                    "name": "AMAZON.CancelIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.HelpIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.StopIntent",
                    "samples": []
                },
                {
                    "name": "EventsIntent",
                    "slots": [
                        {
                            "name": "eventCity",
                            "type": "AMAZON.GB_CITY"
                        }
                    ],
                    "samples": [
                        "whats on in {eventCity}",
                        "whats going on in {eventCity} ",
                        "tell me what events are in {eventCity}"
                    ]
                }
            ],
            "types": []
        }
    }
}

My code is in python, using the flask-ask framework. My main entrypoint looks something like this:

@ask.launch
def start_skill():
    welcome_message = 'Welcome to name_of_app, what do you want?'
    return question(welcome_message)

@ask.intent('EventsIntent', mapping={'city': 'eventCity'})
def weather(city):
    return statement('you have selected {}'.format(city))

Even this simple example however, does not work when the input is:

"whats on in London?"

I have tried with lowercase and with/without punctuation in the testing panel on the amazon developer console, however the return is always:

"you have selected None"

indicating that None is passed as 'eventCity'. Am I passing this slot incorrectly in either the intent schema or in the code?

Thanks

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

hey buddy following is the solution of your problem:

@ask.launch
def start_skill():
    welcome_message = 'Welcome to name_of_app, what do you want?'
    return question(welcome_message)

@ask.intent('EventsIntent', convert={'eventCity': str})
def weather(eventCity):
    return statement('you have selected {}'.format(eventCity))

I was also facing similar issue this thing resolved my issue.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda