fix(tools): fix yield bug in stream_chat (#315)

pull/322/head
x54-729 2023-09-19 14:18:02 +08:00 committed by GitHub
parent cd6426a249
commit b9824fab89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -869,7 +869,7 @@ class InternLMForCausalLM(InternLMPreTrainedModel):
producer.start()
while True:
res = response_queue.get()
if res is not None:
if res is None:
return
yield res