diff --git a/README.md b/README.md index 5a6c6ad5..8600b265 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ 基于 ChatGLM 等大语言模型与 Langchain 等应用框架实现,开源、可离线部署的检索增强生成(RAG)大模型知识库项目。 -### ⚠️ 重要提示 - -`0.2.10`将会是`0.2.x`系列的最后一个版本,`0.2.x`系列版本将会停止更新和技术支持,全力研发具有更强应用性的 `Langchain-Chatchat 0.3.x`。 -`0.2.10` 的后续 bug 修复将会直接推送到`master`分支,而不在进行版本更新。 +> [!IMPORTANT] +> +> `0.2.10`将会是`0.2.x`系列的最后一个版本,`0.2.x`系列版本将会停止更新和技术支持,全力研发具有更强应用性的 `Langchain-Chatchat 0.3.x`。 +> `0.2.10` 的后续 bug 修复将会直接推送到`master`分支,而不在进行版本更新。 --- @@ -47,11 +47,11 @@ OpenAI GPT API 的调用,并将在后续持续扩充对各类模型及模型 A 📺 [原理介绍视频](https://www.bilibili.com/video/BV13M4y1e7cN/?share_source=copy_web&vd_source=e6c5aafe684f30fbe41925d61ca6d514) -![实现原理图](chatchat-server/chatchat/img/langchain+chatglm.png) +![实现原理图](docs/img/langchain+chatglm.png) 从文档处理角度来看,实现流程如下: -![实现原理图2](chatchat-server/chatchat/img/langchain+chatglm2.png) +![实现原理图2](docs/img/langchain+chatglm2.png) 🚩 本项目未涉及微调、训练过程,但可利用微调或训练对本项目效果进行优化。 @@ -67,7 +67,7 @@ OpenAI GPT API 的调用,并将在后续持续扩充对各类模型及模型 A docker run -d --gpus all -p 80:8501 registry.cn-beijing.aliyuncs.com/chatchat/chatchat:0.2.7 ``` -🧩 本项目有一个非常完整的[Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) , README只是一个简单的介绍,_ +🧩 本项目有一个非常完整的 [Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) , README只是一个简单的介绍,_ _仅仅是入门教程,能够基础运行__。 如果你想要更深入的了解本项目,或者想对本项目做出贡献。请移步 [Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) 界面 @@ -78,13 +78,13 @@ _仅仅是入门教程,能够基础运行__。 本开源方案采用```Apache License```,可以免费商用,无需付费。 我们支持市面上主流的本地大语言模型和Embedding模型,支持开源的本地向量数据库。 -支持列表详见[Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) +支持列表详见 [Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) ## 快速上手 ### 1. 环境配置 -+ 首先,确保你的机器安装了 Python 3.8 - 3.11 (我们强烈推荐使用 Python3.11)。 ++ 首先,确保你的机器安装了 Python 3.8 - 3.11 。 ``` $ python --version @@ -109,10 +109,10 @@ $ pip install -r requirements_webui.txt # 默认依赖包括基本运行环境(FAISS向量库)。如果要使用 milvus/pg_vector 等向量库,请将 requirements.txt 中相应依赖取消注释再安装。 ``` -请注意,LangChain-Chatchat `0.2.x` 系列是针对 Langchain `0.0.x` 系列版本的,如果你使用的是 Langchain `0.1.x` -系列版本,需要降级您的`Langchain`版本。 +请注意,LangChain-Chatchat `0.3.x` 当前版本是针对 Langchain `0.1.x` 系列版本的,如果你使用的是 Langchain `0.2.x` +版本,需要降级您的 `Langchain` 版本。 -### 2, 模型下载 +### 2. 模型启动 如需在本地或离线环境下运行本项目,需要首先将项目所需的模型下载至本地,通常开源 LLM 与 Embedding 模型可以从 [HuggingFace](https://huggingface.co/models) 下载。 @@ -138,7 +138,7 @@ $ python copy_config_example.py $ python init_database.py --recreate-vs ``` -### 4. 一键启动 +### 4. 项目一键启动 按照以下命令启动项目 @@ -152,22 +152,21 @@ $ python startup.py -a 1. FastAPI Docs 界面 -![](chatchat-server/chatchat/img/fastapi_docs_026.png) +![](docs/img/fastapi_docs_026.png) 2. Web UI 启动界面示例: - Web UI 对话界面: -![img](chatchat-server/chatchat/img/LLM_success.png) +![img](docs/img/LLM_success.png) - Web UI 知识库管理页面: -![](chatchat-server/chatchat/img/init_knowledge_base.jpg) +![](docs/img/init_knowledge_base.jpg) ### 注意 -以上方式只是为了快速上手,如果需要更多的功能和自定义启动方式 -,请参考[Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) +以上方式只是为了快速上手,如果需要更多的功能和自定义启动方式,请参考[Wiki](https://github.com/chatchat-space/Langchain-Chatchat/wiki/) --- @@ -175,12 +174,11 @@ $ python startup.py -a ## 项目里程碑 + `2023年4月`: `Langchain-ChatGLM 0.1.0` 发布,支持基于 ChatGLM-6B 模型的本地知识库问答。 -+ `2023年8月`: `Langchain-ChatGLM` 改名为 `Langchain-Chatchat`,`0.2.0` 发布,使用 `fastchat` 作为模型加载方案,支持更多的模型和数据库。 ++ `2023年8月`: `Langchain-ChatGLM` 改名为 `Langchain-Chatchat`,发布 `0.2.0` 版本,使用 `fastchat` 作为模型加载方案,支持更多的模型和数据库。 + `2023年10月`: `Langchain-Chatchat 0.2.5` 发布,推出 Agent 内容,开源项目在`Founder Park & Zhipu AI & Zilliz` 举办的黑客马拉松获得三等奖。 + `2023年12月`: `Langchain-Chatchat` 开源项目获得超过 **20K** stars. -+ `2024年1月`: `LangChain 0.1.x` 推出,`Langchain-Chatchat 0.2.x` 发布稳定版本`0.2.10` - 后将停止更新和技术支持,全力研发具有更强应用性的 `Langchain-Chatchat 0.3.x`。 ++ `2024年6月`: `Langchain-Chatchat 0.3.0` 发布,带来全新项目架构。 + 🔥 让我们一起期待未来 Chatchat 的故事 ··· diff --git a/libs/chatchat-server/chatchat/img/LLM_success.png b/docs/img/LLM_success.png similarity index 100% rename from libs/chatchat-server/chatchat/img/LLM_success.png rename to docs/img/LLM_success.png diff --git a/libs/chatchat-server/chatchat/img/agent_continue.png b/docs/img/agent_continue.png similarity index 100% rename from libs/chatchat-server/chatchat/img/agent_continue.png rename to docs/img/agent_continue.png diff --git a/libs/chatchat-server/chatchat/img/agent_success.png b/docs/img/agent_success.png similarity index 100% rename from libs/chatchat-server/chatchat/img/agent_success.png rename to docs/img/agent_success.png diff --git a/libs/chatchat-server/chatchat/img/chatchat-qrcode.jpg b/docs/img/chatchat-qrcode.jpg similarity index 100% rename from libs/chatchat-server/chatchat/img/chatchat-qrcode.jpg rename to docs/img/chatchat-qrcode.jpg diff --git a/docs/img/chatchat_icon_blue_square_v2.png b/docs/img/chatchat_icon_blue_square_v2.png new file mode 100644 index 00000000..5de8ee80 Binary files /dev/null and b/docs/img/chatchat_icon_blue_square_v2.png differ diff --git a/libs/chatchat-server/chatchat/img/docker_logs.png b/docs/img/docker_logs.png similarity index 100% rename from libs/chatchat-server/chatchat/img/docker_logs.png rename to docs/img/docker_logs.png diff --git a/libs/chatchat-server/chatchat/img/fastapi_docs_026.png b/docs/img/fastapi_docs_026.png similarity index 100% rename from libs/chatchat-server/chatchat/img/fastapi_docs_026.png rename to docs/img/fastapi_docs_026.png diff --git a/libs/chatchat-server/chatchat/img/init_knowledge_base.jpg b/docs/img/init_knowledge_base.jpg similarity index 100% rename from libs/chatchat-server/chatchat/img/init_knowledge_base.jpg rename to docs/img/init_knowledge_base.jpg diff --git a/libs/chatchat-server/chatchat/img/knowledge_base_success.jpg b/docs/img/knowledge_base_success.jpg similarity index 100% rename from libs/chatchat-server/chatchat/img/knowledge_base_success.jpg rename to docs/img/knowledge_base_success.jpg diff --git a/libs/chatchat-server/chatchat/img/langchain+chatglm.png b/docs/img/langchain+chatglm.png similarity index 100% rename from libs/chatchat-server/chatchat/img/langchain+chatglm.png rename to docs/img/langchain+chatglm.png diff --git a/libs/chatchat-server/chatchat/img/langchain+chatglm2.png b/docs/img/langchain+chatglm2.png similarity index 100% rename from libs/chatchat-server/chatchat/img/langchain+chatglm2.png rename to docs/img/langchain+chatglm2.png diff --git a/docs/img/logo-long-chatchat-trans-v2.png b/docs/img/logo-long-chatchat-trans-v2.png new file mode 100644 index 00000000..7a689e8c Binary files /dev/null and b/docs/img/logo-long-chatchat-trans-v2.png differ diff --git a/libs/chatchat-server/chatchat/img/official_account_qr.png b/docs/img/official_account_qr.png similarity index 100% rename from libs/chatchat-server/chatchat/img/official_account_qr.png rename to docs/img/official_account_qr.png diff --git a/libs/chatchat-server/chatchat/img/official_wechat_mp_account.png b/docs/img/official_wechat_mp_account.png similarity index 100% rename from libs/chatchat-server/chatchat/img/official_wechat_mp_account.png rename to docs/img/official_wechat_mp_account.png diff --git a/libs/chatchat-server/chatchat/img/partners/autodl.svg b/docs/img/partners/autodl.svg similarity index 100% rename from libs/chatchat-server/chatchat/img/partners/autodl.svg rename to docs/img/partners/autodl.svg diff --git a/libs/chatchat-server/chatchat/img/partners/aws.svg b/docs/img/partners/aws.svg similarity index 100% rename from libs/chatchat-server/chatchat/img/partners/aws.svg rename to docs/img/partners/aws.svg diff --git a/libs/chatchat-server/chatchat/img/partners/chatglm.svg b/docs/img/partners/chatglm.svg similarity index 100% rename from libs/chatchat-server/chatchat/img/partners/chatglm.svg rename to docs/img/partners/chatglm.svg diff --git a/libs/chatchat-server/chatchat/img/partners/zhenfund.svg b/docs/img/partners/zhenfund.svg similarity index 100% rename from libs/chatchat-server/chatchat/img/partners/zhenfund.svg rename to docs/img/partners/zhenfund.svg diff --git a/libs/chatchat-server/README.md b/libs/chatchat-server/README.md index 905eff42..e4896fc7 100644 --- a/libs/chatchat-server/README.md +++ b/libs/chatchat-server/README.md @@ -11,7 +11,7 @@ pip install langchain-chatchat -U - 复制配置文件 > 后面我们会提供一个一键初始化的脚本,现在您可以手动复制配置文件 > 请注意:这个命令会清空数据库,如果您有重要数据,请备份 - ```shell +```shell cd chatchat-server/chatchat mkdir -p ~/.config/chatchat/ cp -r configs ~/.config/chatchat/ diff --git a/libs/chatchat-server/chatchat/configs/model_providers.yaml b/libs/chatchat-server/chatchat/configs/model_providers.yaml index 26d91724..b47142fc 100644 --- a/libs/chatchat-server/chatchat/configs/model_providers.yaml +++ b/libs/chatchat-server/chatchat/configs/model_providers.yaml @@ -1,22 +1,22 @@ -openai: - model_credential: - - model: 'gpt-3.5-turbo' - model_type: 'llm' - model_credentials: - openai_api_key: 'sk-' - openai_organization: '' - openai_api_base: '' - - model: 'gpt-4' - model_type: 'llm' - model_credentials: - openai_api_key: 'sk-' - openai_organization: '' - openai_api_base: '' - - provider_credential: - openai_api_key: 'sk-' - openai_organization: '' - openai_api_base: '' +#openai: +# model_credential: +# - model: 'gpt-3.5-turbo' +# model_type: 'llm' +# model_credentials: +# openai_api_key: 'sk-' +# openai_organization: '' +# openai_api_base: '' +# - model: 'gpt-4' +# model_type: 'llm' +# model_credentials: +# openai_api_key: 'sk-' +# openai_organization: '' +# openai_api_base: '' +# +# provider_credential: +# openai_api_key: 'sk-' +# openai_organization: '' +# openai_api_base: '' xinference: model_credential: @@ -36,14 +36,14 @@ xinference: server_url: 'http://127.0.0.1:9997/' model_uid: 'bge-large-zh-v1.5' -zhipuai: - provider_credential: - api_key: 'd4fa0690b6dfa205204cae2e12aa6fb6.1' +#zhipuai: +# provider_credential: +# api_key: 'd4fa0690b6dfa205204cae2e12aa6fb6.1' -ollama: - model_credential: - - model: 'llama3' - model_type: 'llm' - model_credentials: - base_url: 'http://172.21.192.1:11434' - mode: 'completion' \ No newline at end of file +#ollama: +# model_credential: +# - model: 'llama3' +# model_type: 'llm' +# model_credentials: +# base_url: 'http://172.21.192.1:11434' +# mode: 'completion' \ No newline at end of file diff --git a/libs/chatchat-server/chatchat/img/qr_code_90.jpg b/libs/chatchat-server/chatchat/img/qr_code_90.jpg deleted file mode 100644 index 174d150f..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_90.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_90.png b/libs/chatchat-server/chatchat/img/qr_code_90.png deleted file mode 100644 index e2464800..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_90.png and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_91.jpg b/libs/chatchat-server/chatchat/img/qr_code_91.jpg deleted file mode 100644 index 54107922..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_91.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_92.jpg b/libs/chatchat-server/chatchat/img/qr_code_92.jpg deleted file mode 100644 index 4010c44a..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_92.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_93.jpg b/libs/chatchat-server/chatchat/img/qr_code_93.jpg deleted file mode 100644 index d83ac08d..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_93.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_94.jpg b/libs/chatchat-server/chatchat/img/qr_code_94.jpg deleted file mode 100644 index 00e14b81..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_94.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_95.jpg b/libs/chatchat-server/chatchat/img/qr_code_95.jpg deleted file mode 100644 index 11742e96..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_95.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qr_code_96.jpg b/libs/chatchat-server/chatchat/img/qr_code_96.jpg deleted file mode 100644 index cc0777df..00000000 Binary files a/libs/chatchat-server/chatchat/img/qr_code_96.jpg and /dev/null differ diff --git a/libs/chatchat-server/chatchat/img/qrcode_90_2.jpg b/libs/chatchat-server/chatchat/img/qrcode_90_2.jpg deleted file mode 100644 index 1666a074..00000000 Binary files a/libs/chatchat-server/chatchat/img/qrcode_90_2.jpg and /dev/null differ