oops wrong data strucutre
This commit is contained in:
parent
47887c3925
commit
4b32401542
|
@ -8,7 +8,7 @@ from ..request_handler import OobaRequestHandler
|
|||
@bp.route('/generate', methods=['POST'])
|
||||
def generate():
|
||||
request_valid_json, request_json_body = validate_json(request.data)
|
||||
if not request_valid_json or not request_json_body.get('prompt') or not request_json_body.get('parameters'):
|
||||
if not request_valid_json or not request_json_body.get('prompt'):
|
||||
return jsonify({'code': 400, 'msg': 'Invalid JSON'}), 400
|
||||
else:
|
||||
handler = OobaRequestHandler(request)
|
||||
|
|
Reference in New Issue