from llama_index.core import SummaryIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader("pliki").load_data()
index = SummaryIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("Ile dokumentów wczytałeś?")
print(response)
