From 439dd0faab9811bf112af0b170981b91a36cb427 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:40:11 -0700 Subject: [PATCH] Fix stopping strings in the chat API --- modules/chat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/chat.py b/modules/chat.py index e9c2fe7c..90231ace 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -176,6 +176,9 @@ def get_stopping_strings(state): f"\n{state['name2']}:" ] + if 'stopping_strings' in state and isinstance(state['stopping_strings'], list): + stopping_strings += state.pop('stopping_strings') + return stopping_strings