I am trying to get the slot value and access it later but I am not able to get the value. Can you please help me
this is the line i am stuck with. how do i get the response the from slot and save it to the variable.
textoutput = intent['slots'].['slotsname'].['value']
code:
import logging
from random import randint
from flask import Flask, render_template
from flask_ask import Ask, statement, question, session
app = Flask(__name__)
ask = Ask(app, "/")
logging.getLogger("flask_ask").setLevel(logging.DEBUG)
@ask.intent("MAYBE")
def next_round():
textoutput = intent['slots'].['slotsname'].['value']
textoutput1 = 'working'
textoutput2 = 'not working'
if textoutput ='ftw':
schedule_msg4 = render_template('CONNECTION2', schedule4=textoutput1)
else:
schedule_msg4 = render_template('CONNECTION2', schedule4=textoutput2)
return question(schedule_msg4)
if __name__ == '__main__':
app.run(debug=True)