尝试使用 LLama3 运行 Ollama 并从 LangChain (python) 调用模型时,出现以下错误
langchain_community.llms.ollama.OllamaEndpointNotFoundError: Ollama call failed with status code 404. Maybe your model is not found and you should pull the model with `ollama pull llama3`.
背景:
from langchain_community.llms import Ollama
llm = Ollama(model="llama3", base_url="http://localhost:11434/")
llm.invoke("Why is the sky blue?")
尝试使用 ollamaserve 将 Ollama 作为服务运行(似乎没有什么区别)
我可以看到 Ollama 正在本地主机上运行:11434
当我尝试访问 localhost:11434/llama3 时收到 404 错误
ollama 列表显示已安装 llama 3
当我设置 model="llama2" 时,它在 Jupyter 笔记本中适用于我
llm = Ollama(model="llama2")