加入开发
依赖管理:Poetry与env/dependency管理方法
这个项目使用 Poetry 来管理依赖。
注意:在安装Poetry之前,如果您使用Conda,请创建并激活一个新的Conda env(例如,
conda create-n chatchat python=3.9)
Install Poetry: documentation on how to install it.
注意: 如果您使用 Conda 或 Pyenv 作为您的环境/包管理器,在安装Poetry之后, 使用如下命令使Poetry使用virtualenv python environment (
poetry config virtualenvs.prefer-active-python true)
本地开发环境安装
- 选择主项目目录
cd chatchat
- 安装chatchat依赖(for running chatchat lint\tests):
poetry install --with lint,test
格式化和代码检查
在提交PR之前,请在本地运行以下命令;CI系统也会进行检查。
代码格式化
本项目使用ruff进行代码格式化。
要对某个库进行格式化,请在相应的库目录下运行相同的命令:
cd {model-providers|chatchat|chatchat-server|chatchat-frontend}
make format
此外,你可以使用format_diff命令仅对当前分支中与主分支相比已修改的文件进行格式化:
make format_diff
当你对项目的一部分进行了更改,并希望确保更改的部分格式正确,而不影响代码库的其他部分时,这个命令特别有用。
开始使用
环境配置完成后,启动步骤为先启动chatchat-server,然后启动chatchat-frontend。 chatchat可通过pypi安装一键启动,您也可以选择使用源码启动。
pypi安装一键启动
- 安装chatchat
pip install chatchat
- 复制配置文件
cd chatchat-server/chatchat
python copy_config_example.py
当项目安装完成,配置这个
model_providers.yaml文件,即可完成自定义平台加载注意: 在您配置平台之前,请确认平台依赖完整,例如智谱平台,您需要安装智谱sdk
pip install zhipuai详细配置请参考README.md
- 启动服务
cd chatchat-server/
python -m chatchat.startup -a
源码启动chatchat-server
- 初始化依赖
cd chatchat-server/chatchat
python copy_config_example.py
- 初始化仓库
cd chatchat-server/chatchat
python init_database.py
- 启动服务
python chatchat-server/chatchat/startup.py -a
Metadata
Release files for langchain-chatchat 0.3.0.20240506
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_chatchat-0.3.0.20240506.tar.gz | 27.3 MB | Without provenance | Details for langchain_chatchat-0.3.0.20240506.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_chatchat-0.3.0.20240506-py3-none-any.whl | Python 3 | none | any | Details for langchain_chatchat-0.3.0.20240506-py3-none-any.whl |
Total release size: 54.7 MB
Release files / langchain_chatchat-0.3.0.20240506.tar.gz
| Download URL | langchain_chatchat-0.3.0.20240506.tar.gz |
|---|---|
| Size | 27.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7512eedec8b2403b5d697adb1d7ed1b8c3c9133b0bd68a634f1fd75f48e9f243
|
|
BLAKE2b-256 checksum How to use checksums |
7f8a310e1004c422113d921071b356eea864240d4f1276a1507fffc51413d325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.13 Linux/6.8.7-arch1-1
|
Release files / langchain_chatchat-0.3.0.20240506-py3-none-any.whl
| Download URL | langchain_chatchat-0.3.0.20240506-py3-none-any.whl |
|---|---|
| Size | 27.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a5914870561deffd61fe31851f113642860a0b379535c6a8d0155bdce4a2c67
|
|
BLAKE2b-256 checksum How to use checksums |
3fed4ea7129e88ef3ae422a7f5802ff1e6cd7f593d1d3e557fc5a1e9baccb8c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.13 Linux/6.8.7-arch1-1
|
Security for langchain-chatchat 0.3.0.20240506
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.