from llama_index.core import Settings Settings.llm = ... Settings.embed_model = ...
llama_index.core import set_global_service_context
). And under the hood that method does the aboveindex = VectorStoreIndex.from_documents(..., embed_model=embed_model) index.as_chat_engine(..., llm=llm)
query_engine = RetrieverQueryEngine( retriever=retriever, response_synthesizer=response_synthesizer, node_postprocessors=[get_reranker()], )
retriever = index.as_retriever(emebd_mode=embed_model) from llama_index.core import get_response_synthesizer response_synthesizer = get_response_synthesizer(response_mode="compact", llm=llm)