What is equivalent of .addElicitSlotDirective()
in python? I know this is the right one in node.js
but don't know what is the correct method for asking the user to respond to a specific slot in python.
class QualificationIntentHandler(AbstractRequestHandler):
"""Handler for Hello World Intent."""
def can_handle(self, handler_input):
# type: (HandlerInput) -> bool
return ask_utils.is_intent_name("QualiIntent")(handler_input)
def handle(self, handler_input):
# type: (HandlerInput) -> Response
logger.info("In QualificationIntentHandler")
req_envelope = handler_input.request_envelope
speak_output="This is a test"
return (
handler_input.response_builder
.speak(speak_output).add_directive(
ElicitSlotDirective(slot_to_elicit='Schedule')
# .ask("add a reprompt if you want to keep the session open for the user to respond")
.response
)
question from:
https://stackoverflow.com/questions/65903035/alexa-python-sdk 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…