Код: Выделить всё
from langchain_ollama import ChatOllama
chatmodel = ChatOllama(
model="mistral:latest" # also tried model = 'mistral'
)
response_message = chatmodel.invoke("Tell me a joke")
Код: Выделить всё
AttributeError: 'ModelPrivateAttr' object has no attribute 'chat'
Перед запуском приведенного выше кода Python я проверил, что сервер Ollama включен, и смог чтобы запустить модель Олламы в моем терминале:

< /п>
Подробнее здесь: https://stackoverflow.com/questions/789 ... privateatt