mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-03-09 17:36:51 +08:00
### What problem does this PR solve? When using a chat assistant that has a hardcoded `empty_response`, that response was not returned correctly in streaming mode when no information is found in the knowledge base. In this case only one response with `"content": null` was yielded. If `"references": true`, then the `empty_response` is still put into the `final_content` so there is technically some content returned, but when `"references": false` no content at all is returned. I update the OpenAI chat completion endpoint to yield an additional response with the `empty_response` in the content. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)