From 4bf7253ec5676c0927717d513a83a834c45ecaed Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 3 May 2023 19:27:20 -0300 Subject: [PATCH] Fix typing bug in api --- extensions/api/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)),