Getting error while importing Ollama from 'llama_index.llms' in Linux OS.
from llama_index.llms import Ollama
response = llm.complete(f"What is code?")
print(response)
I installed Ollama from, curl -fsSL https://ollama.com/install.sh | sh
Also Installed , pip3 install llama-index qdrant_client torch transformers
Its installed successfully.
On running , I am getting -
ImportError: cannot import name 'Ollama' from 'llama_index.llms' (unknown location)
You are finding the
ollamain the wrong place. Instead try using theollama-pythonFollow the below link of the github and you will find the appropriate documentation for utilizing
ollama:https://github.com/ollama/ollama-python