mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Fix gzip breaks streaming and flush stream
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from llama_index.core import VectorStoreIndex
|
||||
from llama_index.core.prompts import PromptTemplate
|
||||
@@ -70,4 +71,6 @@ def stream_chat_with_documents(query_str: str, documents: list[Document]):
|
||||
|
||||
response_stream = query_engine.query(prompt)
|
||||
|
||||
yield from response_stream.response_gen
|
||||
for chunk in response_stream.response_gen:
|
||||
yield chunk
|
||||
sys.stdout.flush()
|
||||
|
Reference in New Issue
Block a user