mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 15:13:38 +00:00
Address copilot feedback
This commit is contained in:
parent
24fdcc52b3
commit
04213dff14
6 changed files with 14 additions and 6 deletions
|
|
@ -378,7 +378,7 @@ def generate_reply_HF(question, original_question, state, stopping_strings=None,
|
|||
generate_params['sampler_priority'] = [x.strip() for x in state['sampler_priority'].replace('\n', ',').split(',') if x.strip()]
|
||||
|
||||
if state['custom_token_bans']:
|
||||
to_ban = [int(x) for x in state['custom_token_bans'].split(',')]
|
||||
to_ban = [int(x.strip()) for x in state['custom_token_bans'].split(',') if x.strip()]
|
||||
if len(to_ban) > 0:
|
||||
if generate_params.get('suppress_tokens', None):
|
||||
generate_params['suppress_tokens'] += to_ban
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue