From 8e0a997c6033c51c8265325fd8e210aa5ad905bf Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 29 May 2023 22:03:08 -0300 Subject: [PATCH] Add new parameters to API extension --- extensions/api/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/api/util.py b/extensions/api/util.py index 9c6dd30e..59a015de 100644 --- a/extensions/api/util.py +++ b/extensions/api/util.py @@ -17,6 +17,8 @@ def build_parameters(body, chat=False): 'typical_p': float(body.get('typical_p', body.get('typical', 1))), 'epsilon_cutoff': float(body.get('epsilon_cutoff', 0)), 'eta_cutoff': float(body.get('eta_cutoff', 0)), + 'tfs': float(body.get('tfs', 1)), + 'top_a': float(body.get('top_a', 0)), 'repetition_penalty': float(body.get('repetition_penalty', body.get('rep_pen', 1.1))), 'encoder_repetition_penalty': float(body.get('encoder_repetition_penalty', 1.0)), 'top_k': int(body.get('top_k', 0)),