Skip to main content

加入开发

依赖管理: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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_chatchat-0.3.0.20240506.tar.gz (27.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_chatchat-0.3.0.20240506-py3-none-any.whl (27.4 MB view details)

Uploaded Python 3

File details

Details for the file langchain_chatchat-0.3.0.20240506.tar.gz.

File metadata

  • Download URL: langchain_chatchat-0.3.0.20240506.tar.gz
  • Upload date:
  • Size: 27.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Linux/6.8.7-arch1-1

File hashes

Hashes for langchain_chatchat-0.3.0.20240506.tar.gz
Algorithm Hash digest
SHA256 7512eedec8b2403b5d697adb1d7ed1b8c3c9133b0bd68a634f1fd75f48e9f243
MD5 89d314ad30e9eef2876ea0681ddebfdd
BLAKE2b-256 7f8a310e1004c422113d921071b356eea864240d4f1276a1507fffc51413d325

See more details on using hashes here.

File details

Details for the file langchain_chatchat-0.3.0.20240506-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_chatchat-0.3.0.20240506-py3-none-any.whl
Algorithm Hash digest
SHA256 3a5914870561deffd61fe31851f113642860a0b379535c6a8d0155bdce4a2c67
MD5 7862e98c92ea96f5a34ada88a4da46eb
BLAKE2b-256 3fed4ea7129e88ef3ae422a7f5802ff1e6cd7f593d1d3e557fc5a1e9baccb8c1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1.3

2 files

0.3.1.2

2 files

0.3.1.1

2 files

0.3.1

2 files

0.3.0.20240625

2 files

0.3.0.20240621

2 files

0.3.0.20240619

2 files

0.3.0.20240618

2 files

0.3.0.20240616

2 files

0.3.0.20240612

2 files

0.3.0.20240611

2 files

0.3.0.20240610

2 files

This release

0.3.0.20240506 This release

2 files

0.3.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page