Mitigate UnboundLocalError (#2136)

This commit is contained in:
Konstantin Gukov 2023-05-19 19:46:18 +02:00 committed by GitHub
parent 50c70e28f0
commit 1b52bddfcc
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -291,6 +291,7 @@ def generate_reply_custom(question, original_question, seed, state, eos_token=No
generate_params[k] = state[k]
t0 = time.time()
reply = ''
try:
if not is_chat:
yield ''