# Set Ollama from llama_index.llms.ollama import Ollama from llama_index.core import Settings # Is this syntax below obsolete? llm = Ollama(model="solar", request_timeout=60.0) # Is this the new syntax? Settings.llm = Ollama(model="solar", request_timeout=60.0)
python # Set Ollama from llama_index.llms.ollama import Ollama from llama_index.core import Settings llm = Ollama(model="solar", request_timeout=60.0)
# Testing Ollama response = llm.complete("What is the Maker Movement?") print(response)
from llama_index.core import Settings Settings.llm = Ollama(model="solar", request_timeout=60.0) Settings.embed_model = <embed_modle>
index = VectorStoreIndex.from_documents(..., embed_model=embed_model) query_engine = index.as_query_engine(llm=llm)