From f1d7e54729aaeef8306581fce58f9088fb619260 Mon Sep 17 00:00:00 2001 From: glide-the <2533736852@qq.com> Date: Thu, 13 Jun 2024 14:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=20xinference=E7=8E=AF=E5=A2=83=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=89=8B=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/chatchat-server/README_xinference.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libs/chatchat-server/README_xinference.md b/libs/chatchat-server/README_xinference.md index 2bdb4e62..f4d7b62c 100644 --- a/libs/chatchat-server/README_xinference.md +++ b/libs/chatchat-server/README_xinference.md @@ -25,12 +25,13 @@ $ pip install xinference_client faiss-gpu "unstructured[pdf]" ```shell $ conda create -p ~/miniconda3/envs/xinference python=3.8 $ conda activate ~/miniconda3/envs/xinference -$ pip install xinference --force +$ pip install xinference --force +$ pip install tiktoken sentence-transformers ``` - 启动xinference服务 ```shell - +$ conda activate ~/miniconda3/envs/xinference $ xinference-local ``` - 编辑注册模型脚本 @@ -130,12 +131,13 @@ $ bash ./start_models_emb.sh ``` - 初始化chatchat配置 ```shell +$ conda activate ~/miniconda3/envs/chatchat $ chatchat-config basic --verbose true $ chatchat-config basic --data ~/chatchat-data $ cp ~/miniconda3/envs/chatchat/lib/python3.8/site-packages/chatchat/configs/model_providers.yaml ~/chatchat-data/ ``` --- 设置模型 +- 设置模型 ```shell $ vim ~/chatchat-data/model_providers.yaml # 修改model_providers.yaml文件,添加如下内容 @@ -154,9 +156,15 @@ xinference: server_url: 'http://127.0.0.1:9997/' model_uid: 'bge-large-zh-v1.5' ``` - --- 启动chatchat +- 初始化知识库 ```shell +$ conda activate ~/miniconda3/envs/chatchat +$ chatchat-kb -r + +``` +- 启动chatchat +```shell +$ conda activate ~/miniconda3/envs/chatchat $ chatchat -a ```