Skip to content

Commit d10aa2d

Browse files
authored
Merge pull request #42 from chatchat-space/dev
Dev
2 parents 6e72333 + b8c2669 commit d10aa2d

File tree

2 files changed

+15
-29
lines changed

2 files changed

+15
-29
lines changed

docs/install/README_install.md

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
# Langchain-Chatchat 源代码部署/开发部署指南
1+
# LangGraph-Chatchat 源代码部署/开发部署指南
22

33
## 0. 拉取项目代码
44

55
如果您是想要使用源码启动的用户,请直接拉取 master 分支代码
66

77
```shell
8-
git clone https://github.com/chatchat-space/Langchain-Chatchat.git
8+
git clone https://github.com/chatchat-space/LangGraph-Chatchat.git
99
```
1010

1111
## 1. 初始化开发环境
1212

13-
Langchain-Chatchat 自 0.3.0 版本起,为方便支持用户使用 pip 方式安装部署,以及为避免环境中依赖包版本冲突等问题,
14-
在源代码/开发部署中不再继续使用 requirements.txt 管理项目依赖库,转为使用 Poetry 进行环境管理。
13+
LangGraph-Chatchat 使用 Poetry 进行环境管理。
1514

1615
### 1.1 安装 Poetry
1716

18-
> 在安装 Poetry 之前,如果您使用 Conda,请创建并激活一个新的 Conda 环境,例如使用 `conda create -n chatchat python=3.9` 创建一个新的 Conda 环境。
17+
> 在安装 Poetry 之前,如果您使用 Conda,请创建并激活一个新的 Conda 环境,例如使用 `conda create -n chatchat python=3.12` 创建一个新的 Conda 环境。
1918
2019
安装 Poetry: [Poetry 安装文档](https://python-poetry.org/docs/#installing-with-pipx)
2120

@@ -28,50 +27,37 @@ Langchain-Chatchat 自 0.3.0 版本起,为方便支持用户使用 pip 方式
2827
2928
### 1.2 安装源代码/开发部署所需依赖库
3029

31-
进入主项目目录,并安装 Langchain-Chatchat 依赖
30+
进入主项目目录,并安装 LangGraph-Chatchat 依赖
3231

3332
```shell
34-
cd Langchain-Chatchat/libs/chatchat-server/
33+
cd LangGraph-Chatchat/libs/chatchat-server
3534
poetry install --with lint,test -E xinference
36-
37-
# or use pip to install in editing mode:
38-
pip install -e .
3935
```
4036

4137
> [!Note]
4238
> Poetry install 后会在你的虚拟环境中 site-packages 路径下生成一个 chatchat-`<version>`.dist-info 文件夹带有 direct_url.json 文件,这个文件指向你的开发环境
4339
4440
### 1.3 更新开发部署环境依赖库
4541

46-
当开发环境中所需的依赖库发生变化时,一般按照更新主项目目录(`Langchain-Chatchat/libs/chatchat-server/`)下的 pyproject.toml 再进行 poetry update 的顺序执行。
47-
48-
### 1.4 将更新后的代码打包测试
49-
50-
如果需要对开发环境中代码打包成 Python 库并进行测试,可在主项目目录执行以下命令:
51-
52-
```shell
53-
poetry build
54-
```
55-
56-
命令执行完成后,在主项目目录下会新增 `dist` 路径,其中存储了打包后的 Python 库。
42+
当开发环境中所需的依赖库发生变化时,一般按照更新主项目目录(`LangGraph-Chatchat/libs/chatchat-server/`)下的 pyproject.toml 再进行 poetry update 的顺序执行。
5743

5844
## 2. 设置源代码根目录
5945

60-
如果您在开发时所使用的 IDE 需要指定项目源代码根目录,请将主项目目录(`Langchain-Chatchat/libs/chatchat-server/`)设置为源代码根目录。
46+
如果您在开发时所使用的 IDE 需要指定项目源代码根目录,请将主项目目录(`LangGraph-Chatchat/libs/chatchat-server/`)设置为源代码根目录。
6147

6248
执行以下命令之前,请先设置当前目录和项目数据目录:
6349
```shell
64-
cd Langchain-Chatchat/libs/chatchat-server/chatchat
50+
cd LangGraph-Chatchat/libs/chatchat-server/chatchat
6551
export CHATCHAT_ROOT=/parth/to/chatchat_data
6652
```
6753

6854
## 3. 关于 chatchat 配置项
6955

70-
`0.3.1` 版本开始,所有配置项改为 `yaml` 文件,具体参考 [Settings](settings.md)
56+
配置项均为 `yaml` 文件,具体参考 [Settings](settings.md)
7157

7258
执行以下命令初始化项目配置文件和数据目录:
7359
```shell
74-
cd libs/chatchat-server
60+
cd LangGraph-Chatchat/libs/chatchat-server
7561
python chatchat/cli.py init
7662
```
7763

@@ -81,15 +67,15 @@ python chatchat/cli.py init
8167
> 这个命令会清空数据库、删除已有的配置文件,如果您有重要数据,请备份。
8268
8369
```shell
84-
cd libs/chatchat-server
70+
cd LangGraph-Chatchat/libs/chatchat-server
8571
python chatchat/cli.py kb --recreate-vs
8672
```
8773
如需使用其它 Embedding 模型,或者重建特定的知识库,请查看 `python chatchat/cli.py kb --help` 了解更多的参数。
8874

8975
## 5. 启动服务
9076

9177
```shell
92-
cd libs/chatchat-server
78+
cd LangGraph-Chatchat/libs/chatchat-server
9379
python chatchat/cli.py start -a
9480
```
9581

libs/chatchat-server/chatchat/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class ApiModelSettings(BaseFileSettings):
342342

343343
HISTORY_LEN: int = 10
344344
"""默认历史对话轮数"""
345-
"""LangGraph Agent 单轮对话可能包含 4 个 Node, 故默认设置为 6"""
345+
"""LangGraph Agent 单轮对话可能包含多个 Node, 故默认设置为 10"""
346346

347347
MAX_TOKENS: t.Optional[int] = None # TODO: 似乎与 LLM_MODEL_CONFIG 重复了
348348
"""大模型最长支持的长度,如果不填写,则使用模型默认的最大长度,如果填写,则为用户设定的最大长度"""
@@ -525,7 +525,7 @@ class ToolSettings(BaseFileSettings):
525525
默认为 memory, 无法持久化,仅在程序运行期间用于获取历史消息。
526526
如果设为 sqlite/postgres,则自动使用 SQLALCHEMY_DATABASE_URI
527527
"""
528-
GRAPH_MEMORY_TYPE: t.Literal["memory", "sqlite", "postgres"] = "memory"
528+
GRAPH_MEMORY_TYPE: t.Literal["memory", "sqlite", "postgres"] = "sqlite"
529529

530530
# """本地知识库工具配置项"""
531531
# search_local_knowledgebase: dict = {

0 commit comments

Comments
 (0)