{"id":13600354,"url":"https://github.com/kevwan/chatbot","last_synced_at":"2025-04-05T22:09:51.318Z","repository":{"id":44051413,"uuid":"408479276","full_name":"kevwan/chatbot","owner":"kevwan","description":"A fast responsive, machine learning, conversational dialog engine for creating chat bots, written in Go.","archived":false,"fork":false,"pushed_at":"2023-08-19T14:26:40.000Z","size":4048,"stargazers_count":420,"open_issues_count":3,"forks_count":69,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T21:08:42.821Z","etag":null,"topics":["bot","chatbot","chatbot-framework","chatterbot","conversation","go","golang","language","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevwan.png","metadata":{"files":{"readme":"readme-cn.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":"2021-09-20T14:37:49.000Z","updated_at":"2025-03-26T12:38:09.000Z","dependencies_parsed_at":"2024-06-18T20:12:07.082Z","dependency_job_id":"fe40ab72-0156-4f1a-a305-62f746d4a417","html_url":"https://github.com/kevwan/chatbot","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fchatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fchatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fchatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fchatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevwan","download_url":"https://codeload.github.com/kevwan/chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406111,"owners_count":20933806,"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":["bot","chatbot","chatbot-framework","chatterbot","conversation","go","golang","language","machine-learning"],"created_at":"2024-08-01T18:00:37.294Z","updated_at":"2025-04-05T22:09:51.283Z","avatar_url":"https://github.com/kevwan.png","language":"Go","readme":"# chatbot\n\n[English](readme.md) | 简体中文\n\n## 项目说明\n\n`chatbot` 是一个通过已知对话数据集快速生成回答的 Go 问答引擎。比 [ChatterBot](https://github.com/gunthercox/ChatterBot) 快非常多，我们在1.2亿对话上的对比结果是：[ChatterBot](https://github.com/gunthercox/ChatterBot) 回答需要21秒，chatbot 只需要18毫秒。\n\n* bot\n\n  问答引擎\n\n* cli\n  \n  * train\n  \n    训练给定的问答数据并生成 `.gob` 文件\n  \n    * `-d` 读取指定目录下所有 `json` 和 `yaml` 语料文件\n    * `-i` 读取指定的 `json` 或 `yaml` 语料文件，多个文件用逗号分割\n    * `-o` 指定输出的 `.gob` 文件\n    * `-m` 定时打印内存使用情况\n  \n  * ask\n  \n    一个示例的问答命令行工具\n  \n    * `-v` verbose\n    * `-c` 训练好的 `.gob` 文件\n    * `-t` 数据几个可能的答案\n\n## 数据格式\n\n数据格式可以通过 `yaml` 或者 `json` 文件提供，参考 `https://github.com/kevwan/chatterbot-corpus` 里的格式。大致如下：\n\n```yaml\ncategories:\n- AI\nconversations:\n- - 什么是ai\n  - 人工智能是工程和科学的分支,致力于构建具有思维的机器。\n- - 你是什么语言编写的\n  - Python\n- - 你听起来像机器\n  - 是的,我受到造物者的启发\n- - 你是一个人工智能\n  - 那是我的名字。\n```\n\n## 问答示例\n\n```text\nuser: 在吗？\nbot: 在\nuser: 在干嘛呢？\nbot: 看电视\nuser: 看啥电视呀\nbot: 活色生香\nuser: 很好看吗？\nbot: 特搞笑\nuser: 你在哪里呀？\nbot: 家里\nuser: 家里就你一个人嘛？\nbot: 我喜欢一个人玩\nuser: 那我过来找你？\nbot: 不可以，乖乖上班去\n```\n\n## 致谢\n\nChatterBot - https://github.com/gunthercox/ChatterBot\n\n最早我是使用 [ChatterBot](https://github.com/gunthercox/ChatterBot).的，但由于回答太慢，所有后来只能自己实现了，感谢 [ChatterBot](https://github.com/gunthercox/ChatterBot)，非常棒的项目！\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevwan%2Fchatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevwan%2Fchatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevwan%2Fchatbot/lists"}