Fix typing bug in api

This commit is contained in:
oobabooga 2023-05-03 19:27:20 -03:00
parent d6410a1b36
commit 4bf7253ec5

View File

@ -32,7 +32,7 @@ def build_parameters(body):
'length_penalty': float(body.get('length_penalty', 1)), 'length_penalty': float(body.get('length_penalty', 1)),
'early_stopping': bool(body.get('early_stopping', False)), 'early_stopping': bool(body.get('early_stopping', False)),
'seed': int(body.get('seed', -1)), '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)), 'truncation_length': int(body.get('truncation_length', 2048)),
'ban_eos_token': bool(body.get('ban_eos_token', False)), 'ban_eos_token': bool(body.get('ban_eos_token', False)),
'skip_special_tokens': bool(body.get('skip_special_tokens', True)), 'skip_special_tokens': bool(body.get('skip_special_tokens', True)),