diff --git a/chatchat-server/README.md b/chatchat-server/README.md index 27ecdd18..a3b5ce87 100644 --- a/chatchat-server/README.md +++ b/chatchat-server/README.md @@ -41,4 +41,53 @@ make format make format_diff ``` -当你对项目的一部分进行了更改,并希望确保更改的部分格式正确,而不影响代码库的其他部分时,这个命令特别有用。 \ No newline at end of file +当你对项目的一部分进行了更改,并希望确保更改的部分格式正确,而不影响代码库的其他部分时,这个命令特别有用。 + + +### 开始使用 + +> 环境配置完成后,启动步骤为先启动chatchat-server,然后启动chatchat-frontend。 +> chatchat可通过pypi安装一键启动,您也可以选择使用源码启动。 + +#### pypi安装一键启动 +- 安装chatchat +```shell +pip install chatchat +``` +- 复制配置文件 + + ```shell +cd chatchat-server/chatchat +python copy_config_example.py +``` + +> 当项目安装完成,配置这个`model_providers.yaml`文件,即可完成自定义平台加载 +> +> 注意: 在您配置平台之前,请确认平台依赖完整,例如智谱平台,您需要安装智谱sdk `pip install zhipuai` +> +> 详细配置请参考[README.md](..%2Fmodel-providers%2FREADME.md) + + +- 启动服务 +```shell +cd chatchat-server/ +python -m chatchat.startup -a +``` + + + +#### 源码启动chatchat-server +- 初始化依赖 +```shell +cd chatchat-server/chatchat +python copy_config_example.py +``` +- 初始化仓库 +```shell +cd chatchat-server/chatchat +python init_database.py +``` +- 启动服务 +```shell +python chatchat-server/chatchat/startup.py -a +``` diff --git a/chatchat-server/pyproject.toml b/chatchat-server/pyproject.toml index 76fa1a12..20f99a58 100644 --- a/chatchat-server/pyproject.toml +++ b/chatchat-server/pyproject.toml @@ -6,7 +6,7 @@ authors = ["chatchat"] readme = "README.md" [tool.poetry.dependencies] -python = ">=3.8.1,<4.0,!=3.9.7" +python = ">=3.8.1,<3.12,!=3.9.7" model-providers = "^0.3.0" langchain = "0.1.5" langchainhub = "0.1.14" @@ -44,7 +44,7 @@ python-multipart = "0.0.9" streamlit = "1.30.0" streamlit-option-menu = "0.3.12" streamlit-antd-components = "0.3.1" -streamlit-chatbox = "1.1.11" +streamlit-chatbox = "1.1.12" streamlit-modal = "0.1.0" streamlit-aggrid = "0.3.4.post3" @@ -235,3 +235,10 @@ ignore-regex = '.*(Stati Uniti|Tense=Pres).*' # aapply - async apply # unsecure - typo but part of API, decided to not bother for now ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin' + + +# https://python-poetry.org/docs/repositories/ +[[tool.poetry.source]] +name = "tsinghua" +url = "https://pypi.tuna.tsinghua.edu.cn/simple/" +priority = "default" \ No newline at end of file diff --git a/model-providers/pyproject.toml b/model-providers/pyproject.toml index ba4d923d..8a4db8a0 100644 --- a/model-providers/pyproject.toml +++ b/model-providers/pyproject.toml @@ -6,7 +6,7 @@ authors = ["glide-the <2533736852@qq.com>"] readme = "README.md" [tool.poetry.dependencies] -python = ">=3.8.1,<4.0,!=3.9.7" +python = ">=3.8.1,<3.12,!=3.9.7" transformers = "4.31.0" fastapi = "^0.109.2" uvicorn = ">=0.27.0.post1" @@ -198,3 +198,10 @@ ignore-regex = '.*(Stati Uniti|Tense=Pres).*' # aapply - async apply # unsecure - typo but part of API, decided to not bother for now ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin' + + +# https://python-poetry.org/docs/repositories/ +[[tool.poetry.source]] +name = "tsinghua" +url = "https://pypi.tuna.tsinghua.edu.cn/simple/" +priority = "default" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bb18c249..56d3a2a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ repository = "https://github.com/chatchat-space/Langchain-Chatchat.git" [tool.poetry.dependencies] -python = ">=3.8.1,<4.0,!=3.9.7" +python = ">=3.8.1,<3.12,!=3.9.7" [tool.poetry.group.lint.dependencies] @@ -46,3 +46,9 @@ extend-exclude = [ "cookbook/gymnasium_agent_simulation.ipynb" = ["F821"] "docs/docs/integrations/document_loaders/tensorflow_datasets.ipynb" = ["F821"] + +# https://python-poetry.org/docs/repositories/ +[[tool.poetry.source]] +name = "tsinghua" +url = "https://pypi.tuna.tsinghua.edu.cn/simple/" +priority = "default" \ No newline at end of file