【LangChain入门 1】安装
本学习系列以Ollama推理后端作为大语言模型,展开对LangChain框架的入门学习。模型采用。毕竟是免费开源的,下载过程耐心等待即可。如果可以连接外网,也可以通过OpenAI,来建立LLM模型。
·
本学习系列以Ollama推理后端作为大语言模型,展开对LangChain框架的入门学习。
模型采用deepseek-r1:7b。
毕竟是免费开源的,下载过程耐心等待即可。
如果可以连接外网,也可以通过OpenAI,来建立LLM模型
一、安装LangChain
其中 langchain_chroma 是向量数据库,将转成的向量数据库存在Chroma里
pip install langchain -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install langchain_community -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install langchain_ollama -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install langchain_chroma -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install "langserve[all]" -i https://pypi.tuna.tsinghua.edu.cn/simple
二、安装Ollama
打开Ollama官网
https://ollama.com/download
找到Linux的下载链接

运行链接
curl -fsSL https://ollama.com/install.sh | sh
三、Ollama下载DeepSeekR1-7b模型
玩具版本,就用7b执行
ollama run deepseek-r1
下载过程可能会有点慢,耐心等待接口。
火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。
更多推荐
所有评论(0)