query_engine = index.as_query_engine(streaming=True, similarity_top_k=1) streaming_response = query_engine.query( "What did the author do growing up?", )
streaming_response.print_response_stream()
print(response.source_nodes)
query_engine = index.as_query_engine(streaming=True, similarity_top_k=1) streaming_response = query_engine.query( "Write me a long essay about the context", ) print(streaming_response.source_nodes) streaming_response.print_response_stream()