{"id":23051128,"url":"https://github.com/duguce/chatbotx","last_synced_at":"2025-04-24T05:34:37.170Z","repository":{"id":170596684,"uuid":"644412139","full_name":"Duguce/ChatBotX","owner":"Duguce","description":"🏆 基于transformer的单轮对话中文聊天机器人","archived":false,"fork":false,"pushed_at":"2023-12-18T14:55:24.000Z","size":223,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T07:22:50.581Z","etag":null,"topics":["chatbot","python3","tensorflow2","transformer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Duguce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-23T13:14:23.000Z","updated_at":"2025-03-03T13:42:06.000Z","dependencies_parsed_at":"2023-12-18T16:09:27.687Z","dependency_job_id":"32ba5158-85b8-4a4c-9b52-c101890c045c","html_url":"https://github.com/Duguce/ChatBotX","commit_stats":null,"previous_names":["duguce/chatbotx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duguce%2FChatBotX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duguce%2FChatBotX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duguce%2FChatBotX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duguce%2FChatBotX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Duguce","download_url":"https://codeload.github.com/Duguce/ChatBotX/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250572661,"owners_count":21452334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","python3","tensorflow2","transformer"],"created_at":"2024-12-15T23:44:33.000Z","updated_at":"2025-04-24T05:34:37.154Z","avatar_url":"https://github.com/Duguce.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatBotX\r\n\r\n本项目是基于50w小黄鸡对话语料构建的Transformer生成式单轮对话模型。本项目受启发于另外一个使用seq2seq模型构建的[单轮对话模型](https://github.com/Schellings/Seq2SeqModel)。\r\n\r\n目前模型的效果相对一般（具体效果如下图所示），待进一步完善...\r\n\r\n\u003cimg src=\"https://zhgyqc.oss-cn-hangzhou.aliyuncs.com/image-20230606190909976.png\" alt=\"模型效果展示\" style=\"zoom:67%;\" /\u003e\r\n\r\n## 项目结构\r\n\r\n```shell\r\n│  .gitignore\r\n│  chat.py\r\n│  config.py\r\n│  data_processing.py\r\n│  LICENSE\r\n│  README.md\r\n│  requirements.txt\r\n│  train.py\r\n│  train_helper.ipynb\r\n│  transformer.py\r\n│  utils.py\r\n│\r\n├─data\r\n│      vocab.pkl\r\n│      xhj_data.tsv\r\n│\r\n├─saved_models\r\n```\r\n\r\n## 环境配置\r\n\r\n环境配置只需要两个步骤：\r\n\r\n- 下载项目文件\r\n- 安装相关的第三方库\r\n\r\n具体步骤如下：\r\n\r\n```\r\ngit@github.com:Duguce/ChatBotX.git \u0026\u0026 cd ChatBotX\r\npip install requirements.txt\r\n```\r\n\r\n## 模型使用\r\n\r\n- 生成词表\r\n\r\n```\r\npython data_processing.py\r\n```\r\n\r\n- 模型训练\r\n\r\n```\r\npython train.py\r\n```\r\n\r\n在进行模型训练之前，需要调整一下`config.py`中的参数设置。\r\n\r\n- 模型预测\r\n\r\n训练好的模型会保存在`saved_models`目录下。\r\n\r\n- 体验交互式聊天\r\n\r\n```\r\npython chat.py\r\n```\r\n\r\n## 开源协议\r\n\r\n本仓库下的作品若无特殊说明均采用 [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) 开源协议进行许可\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduguce%2Fchatbotx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduguce%2Fchatbotx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduguce%2Fchatbotx/lists"}