Settings.llm and Settings.embed_model
but it does not help - still getting 401 expired token
when querying.llm.api_key
contains new token, but retriever._embed_model.api_key
is old. Which I suspect causing this issue. From what I can see in code .as_query_engine
factory method resolves llm but it does not resolve embed_model. Is there a reason for that?api_key
for existing loaded index / query engine?index.as_query_engine(llm=llm, embed_model=embed_model)
llama_index.core.indices.document_summary.retrievers.DocumentSummaryIndexEmbeddingRetriever got multiple values for keyword argument "embed_model"
index._embed_model = embed_model
or create the retriever and query engine on your ownfrom llama_index.core.indices.document_summary.retrievers import DocumentSummaryIndexEmbeddingRetriever retriever = DocumentSummaryIndexEmbeddingRetriever(index, embed_model=self._embed_model) from llama_index.core.query_engine import RetrieverQueryEngine query_engine = RetrieverQueryEngine.from_args(retriever, llm=llm)