@app.route('/chat', methods=['GET']) def chat(): text = request.args.get('query') return jsonify({'answer': text})