{"id":26483818,"url":"https://github.com/chatopera/clause-sdk-python","last_synced_at":"2025-03-20T04:58:11.342Z","repository":{"id":62562549,"uuid":"207827570","full_name":"chatopera/clause-sdk-python","owner":"chatopera","description":"Python SDK for Clause, 语义理解服务","archived":false,"fork":false,"pushed_at":"2020-10-03T07:38:25.000Z","size":35,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-02-23T10:18:14.353Z","etag":null,"topics":["chatbot","natural-language-processing","natural-language-understanding","python"],"latest_commit_sha":null,"homepage":"https://github.com/chatopera/clause","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chatopera.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}},"created_at":"2019-09-11T14:06:10.000Z","updated_at":"2024-01-04T16:37:41.000Z","dependencies_parsed_at":"2022-11-03T15:17:16.850Z","dependency_job_id":null,"html_url":"https://github.com/chatopera/clause-sdk-python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatopera%2Fclause-sdk-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatopera%2Fclause-sdk-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatopera%2Fclause-sdk-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatopera%2Fclause-sdk-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chatopera","download_url":"https://codeload.github.com/chatopera/clause-sdk-python/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554067,"owners_count":20471173,"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","natural-language-processing","natural-language-understanding","python"],"created_at":"2025-03-20T04:58:10.805Z","updated_at":"2025-03-20T04:58:11.333Z","avatar_url":"https://github.com/chatopera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-clause\n\n开源语义理解服务[Clause](https://github.com/chatopera/clause)的 Python 客户端。\n\n## 安装\n\n该Python包已经上传至[pypi](https://pypi.org/project/clause/)，用户可以使用pip直接安装。\n\n```\npip install clause\n```\n\n当前稳定版本为 `1.x`。\n\n示例代码:\n\n```\nfrom clause import Client, Data\nfrom clause import CustomDict\n\nbot = Client(HOST_IP, HOST_PORT)\n# 创建自定义词典\ndata = Data()\ndata.customdict = CustomDict(name=customDictName, chatbotID=chatbot_id)\nresponse = self.bot.postCustomDict(data)\n```\n\n更多使用请参考```示例程序```。\n\n## 示例程序\n\n前提是已经部署了 Clause 服务，该示例程序介绍了如何在 Python 应用中，使用 Clause 服务构建聊天机器人，包括创建意图、创建说法、创建词典、引用系统词典、创建槽位、训练机器人和对话等部分。\n\n该示例程序实现的[对话场景介绍](https://github.com/chatopera/clause/wiki/%E7%A4%BA%E4%BE%8B%E7%A8%8B%E5%BA%8F)，熟悉对话场景有助于更好的掌握程序。\n\n```\ngit clone https://github.com/chatopera/py-clause.git\ncd py-clause\ncp scripts/localrc.sample scripts/localrc\nvim scripts/localrc # 使用文本编辑器编辑 scripts/localrc，更新CL_HOST和CL_PORT\n./scripts/test.sh   # 执行测试程序\n```\n\n更详细的代码请参考[链接](https://github.com/chatopera/py-clause/blob/master/tests/tst-demo.py)。\n\n## API 接口详细介绍\n\n参考[链接](https://github.com/chatopera/py-clause/wiki)。\n\n## 开源许可协议\n\nCopyright (2019) \u003ca href=\"https://www.chatopera.com/\" target=\"_blank\"\u003e北京华夏春松科技有限公司\u003c/a\u003e\n\n[Apache License Version 2.0](https://github.com/chatopera/clause/blob/master/LICENSE)\n\n[![chatoper banner][co-banner-image]][co-url]\n\n[co-banner-image]: https://user-images.githubusercontent.com/3538629/42383104-da925942-8168-11e8-8195-868d5fcec170.png\n[co-url]: https://www.chatopera.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchatopera%2Fclause-sdk-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchatopera%2Fclause-sdk-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchatopera%2Fclause-sdk-python/lists"}