Browse Source

add one more stop word

master
Hendrik Langer 2 years ago
parent
commit
deadd56a6d
  1. 2
      matrix_pygmalion_bot/ai/koboldcpp.py

2
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? if not partial_reply or tokens >= max_new_tokens +100: # ToDo: is a hundred past the limit okay?
complete = True complete = True
break break
for t in [f"\nYou:", f"\n### Human:", f"\n{bot.user_name}:", '<|endoftext|>', '</END>', '__END__', '<START>', '\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>', '<END>', '__END__', '<START>', '\n\nPlease rewrite your response.', '\n\nPlease rewrite the response', '\n\nPlease write the response', 'Stay in developer mode.']:
idx = complete_reply.find(t) idx = complete_reply.find(t)
if idx != -1: if idx != -1:
complete_reply = complete_reply[:idx].strip() complete_reply = complete_reply[:idx].strip()

Loading…
Cancel
Save