Find answers from the community

Home
Members
Tominand
T
Tominand
Offline, last seen 3 months ago
Joined September 25, 2024
Hello everyone, I started to get acquainted with llama-index and I have a small question for the experts, I wrote a service for processing HTML documents and I want to index these documents, but this is not a task, when I do indexing I get three json files and after that when i try to promt to one of the indexes i wait more than 10 minutes for a response, how can i speed up getting the response results?
Here are some code snippets:
Plain Text
This method is responsible for answering the corresponding document
    def load_index(self, index_name, prompt):
        try:
            index_path = f"{self.directory_path}/indexes/index_{index_name}"
            documents = SimpleDirectoryReader(index_path).load_data()
            index = GPTVectorStoreIndex.from_documents(documents)
            query_engine = index.as_query_engine()
            return query_engine.query(prompt)
        except Exception as e:
            return HTTPException(status_code=404, detail='Not Found')
9 comments
j
W
T