Fix: rm think if stream is Flase. (#5458)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-02-28 10:05:18 +08:00 committed by GitHub
parent 8b2c04abc4
commit 5fdfb8d465
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,7 +194,7 @@ def chat(dialog, messages, stream=True, **kwargs):
if isinstance(think, str):
thought = think
knowledges = [t for t in think.split("\n") if t]
else:
elif stream:
yield think
else:
kbinfos = retriever.retrieval(" ".join(questions), embd_mdl, tenant_ids, dialog.kb_ids, 1, dialog.top_n,