QueryEngine
A query engine wraps a Retriever
and a ResponseSynthesizer
into a pipeline, that will use the query string to fetech nodes and then send them to the LLM to generate a response.
const queryEngine = index.asQueryEngine();
const response = await queryEngine.query({ query: "query string" });