mirror of https://github.com/InternLM/InternLM
fix(tools): fix yield bug in stream_chat (#315)
parent
cd6426a249
commit
b9824fab89
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue