Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
301 views
in Technique[技术] by (71.8m points)

Alexa Python SDK

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...