Find answers from the community

Updated 4 weeks ago

Openai

If you aren't using OpenAI, or want a more selective installation, you can install individual packages as needed. --> if this statement intent is correct then the install is quite the opposite πŸ™‚ maybe a Bug for the team :p
L
1 comment
The global defaults are openai. If you want to change the defaults, you'll need to install the llm and embedding model class you want to use, and either change the defaults, or pass in the llm/embed model explicitly

For example

Plain Text
pip install llama-index-llms-ollama llama-index-embeddings-ollama


To change global defaults
Plain Text
from llama_index.llms.ollama import Ollama
from llama_index.embeddings.ollama import OllamaEmbedding
from llama_index.core import Settings

Settings.llm = Ollama(...)
Settings.embed_model = OllamaEmbedding(...)


To override global defaults locally

Plain Text
index = VectorStoreIndex(..., embed_model=embed_model)

query_engine = index.as_query_engine(..., llm=llm)
Add a reply
Sign up and join the conversation on Discord