这里使用ollama启动本地大模型,然后graphrag使用本地大模型作为底座。
选用了https://github.com/NanGePlus/GraphragTest 感谢开源分享
拉取代码
git clone https://github.com/NanGePlus/GraphragTest
当前时间的requirements.txt内容如下
fastapi==0.112.0
uvicorn==0.30.6
pandas==2.2.2
tiktoken==0.7.0
graphrag==0.3.0
pydantic==2.8.2
python-dotenv==1.0.1
asyncio==3.4.3
aiohttp==3.10.3
numpy==1.26.4
scikit-learn==1.5.1
matplotlib==3.9.2
seaborn==0.13.2
nltk==3.8.1
spacy==3.7.5
transformers==4.44.0
torch==2.2.2
torchvision==0.17.2
torchaudio==2.2.2
这里使用的是graphrag 0.3.0,当前最新版本是0.3.2
安装依赖
conda create -n graphrag-local python=3.11
conda activate graphrag-local
pip install -r requirements.txt
创建graphrag所需文件夹
进入到项目根目录
mkdir ollama_test
cd