From deadd56a6d1ec18b89a807f16f84166f67a804cc Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Sun, 16 Apr 2023 14:09:15 +0200 Subject: [PATCH] add one more stop word --- matrix_pygmalion_bot/ai/koboldcpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix_pygmalion_bot/ai/koboldcpp.py b/matrix_pygmalion_bot/ai/koboldcpp.py index 61e0665..0fa98b9 100644 --- a/matrix_pygmalion_bot/ai/koboldcpp.py +++ b/matrix_pygmalion_bot/ai/koboldcpp.py @@ -80,7 +80,7 @@ async def generate_sync( if not partial_reply or tokens >= max_new_tokens +100: # ToDo: is a hundred past the limit okay? complete = True break - for t in [f"\nYou:", f"\n### Human:", f"\n{bot.user_name}:", '<|endoftext|>', '', '__END__', '', '\n\nPlease rewrite your response.', '\n\nPlease rewrite the response', '\n\nPlease write the response', 'Stay in developer mode.']: + for t in [f"\nYou:", f"\n### Human:", f"\n{bot.user_name}:", '<|endoftext|>', '', '', '__END__', '', '\n\nPlease rewrite your response.', '\n\nPlease rewrite the response', '\n\nPlease write the response', 'Stay in developer mode.']: idx = complete_reply.find(t) if idx != -1: complete_reply = complete_reply[:idx].strip()