Ive created a weatherbot using version 7 of RASA,which was working perfectly fine.I have upgraded RASA (NLU : 0.13.8,CORE : 0.12.3 )
Im not able to get the response from the bot,it shows RasaCoreServer has no attribute ‘handle_text’
Here is my code snippet ::
@app.route(‘/api/v1/<sender_id>/respond’, methods=[‘GET’, ‘POST’])
def respond(self, request, sender_id):
request.setHeader('Content-Type', 'application/json')
request.setHeader('Access-Control-Allow-Origin', '*')
request_params = request_parameters(request)
print("=========Request PARam================: ",request_params)
if 'query' in request_params:
message = request_params.pop('query')
elif 'q' in request_params:
message = request_params.pop('q')
else:
request.setResponseCode(400)
return json.dumps({"error": "Invalid parse parameter specified"})
try:
out = CollectingOutputChannel()
print("***********", message, "====", out, "====", sender_id)
response = self.handle_text(self, message, output_channel=out, sender_id=sender_id)
response = UserMessage(message, out, sender_id)
print("==UserMessage==", response.__dict__)
request.setResponseCode(200)
print("TRY: " , response)
return json.dumps(response)
except Exception as e:
request.setResponseCode(500)
logger.error("Caught an exception during parse: {}".format(e), exc_info=1)
return json.dumps({"error": "{}".format(e)})
Attaching the screenshot of error …
Please help me in resolving the issue…