query_engine = self.index.as_query_engine( service_context=self.service_context, text_qa_template=qa_template_copy, refine_template=refine_template_prompt, streaming=streaming, similarity_top_k=3, doc_ids=doc_ids, verbose=True, )
'Response' object has no attribute 'response_gen'
def generate_response_stream(response_gen): """Yield the response stream.""" # stream json data for text in response_gen: yield text return Response(generate_response_stream(data.response_gen), mimetype='text/json')