diff --git a/extensions/api/util.py b/extensions/api/util.py index 343aa75b..63117aaf 100644 --- a/extensions/api/util.py +++ b/extensions/api/util.py @@ -32,7 +32,7 @@ def build_parameters(body): 'length_penalty': float(body.get('length_penalty', 1)), 'early_stopping': bool(body.get('early_stopping', False)), 'seed': int(body.get('seed', -1)), - 'add_bos_token': int(body.get('add_bos_token', True)), + 'add_bos_token': bool(body.get('add_bos_token', True)), 'truncation_length': int(body.get('truncation_length', 2048)), 'ban_eos_token': bool(body.get('ban_eos_token', False)), 'skip_special_tokens': bool(body.get('skip_special_tokens', True)),