#創(chuàng)建虛擬環(huán)境
conda create --name constomer python==3.12
conda activate constomer
#安裝依賴
pip install -r requirements.txt
ollama 啟動服務(wù)
ollama serve
mysql部分
#安裝Mysql
sudo apt-get update
sudo apt-get install mysql-server
#啟動mysql服務(wù)
#windows下啟動命令
net start mysql
#服務(wù)器
service mysql start
#首次
mysql -u root -p
#創(chuàng)建賬戶
CREATE USER 'gpt'@'localhost' IDENTIFIED BY 'gpt';
#給賬戶賦權(quán)限
GRANT ALL PRIVILEGES ON *.* TO 'gpt'@'localhost';
FLUSH PRIVILEGES;
#創(chuàng)建數(shù)據(jù)庫
create database al_chat;
#初始化數(shù)據(jù)庫
cd llm_backend
python ./scripts/init_db.py
redis啟動服務(wù)
redis-server ../redis.conf
neo4j 可能要下載對應(yīng)版本的 APOC 插件
https://neo4j.com/deployment-center/
https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases
https://github.com/neo4j/apoc/releases/tag/5.26.0
把 apoc-5.26.0-core.jar文件放進 plugins 文件夾
打開 Neo4j 的 conf/neo4j.conf,添加配置
dbms.security.procedures.unrestricted=apoc.*
創(chuàng)建apoc.conf
apoc.export.file.enabled=true
apoc.import.file.enabled=true
重啟服務(wù)