mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Minor change to prevent future bugs
This commit is contained in:
parent
e6e5f546b8
commit
365b672531
@ -1,4 +1,5 @@
|
||||
import ast
|
||||
import copy
|
||||
import random
|
||||
import re
|
||||
import time
|
||||
@ -9,8 +10,11 @@ import torch
|
||||
import transformers
|
||||
|
||||
import modules.shared as shared
|
||||
from modules.callbacks import (Iteratorize, Stream,
|
||||
_StopEverythingStoppingCriteria)
|
||||
from modules.callbacks import (
|
||||
Iteratorize,
|
||||
Stream,
|
||||
_StopEverythingStoppingCriteria
|
||||
)
|
||||
from modules.extensions import apply_extensions
|
||||
from modules.html_generator import generate_4chan_html, generate_basic_html
|
||||
from modules.logging_colors import logger
|
||||
@ -204,6 +208,7 @@ def _generate_reply(question, state, stopping_strings=None, is_chat=False):
|
||||
reply = ''
|
||||
is_stream = state['stream']
|
||||
if len(all_stop_strings) > 0 and not state['stream']:
|
||||
state = copy.deepcopy(state)
|
||||
state['stream'] = True
|
||||
|
||||
for reply in generate_func(question, original_question, seed, state, stopping_strings, is_chat=is_chat):
|
||||
|
Loading…
Reference in New Issue
Block a user