nonebot-plugin-xinghuo-api


Namenonebot-plugin-xinghuo-api JSON
Version 2.2.0 PyPI version JSON
download
home_page
SummaryA nonebot plugin for xinghuo LLM
upload_time2024-01-31 04:22:28
maintainer
docs_urlNone
authorAlpaca
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
  <br>
  <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>

<div align="center">

# nonebot-plugin-chatgpt-turbo
</div>

# 介绍
- 本插件是适配科大讯飞星火大模型官方API的聊天机器人插件,同时具有上下文记忆回复功能。已适配V3.0版API及星火助手API。
# 安装

* 手动安装
  ```
  git clone https://github.com/Alpaca4610/nonebot_plugin_xinghuo_api.git
  ```

  下载完成后在bot项目的pyproject.toml文件手动添加插件:

  ```
  plugin_dirs = ["xxxxxx","xxxxxx",......,"下载完成的插件路径/nonebot-plugin-xinghuo-api"]
  ```
* 使用 pip
  ```
  pip install nonebot-plugin-xinghuo-api
  ```

# 配置文件

必选内容: 在Bot根目录下的.env文件中填入科大讯飞提供的API调用鉴权信息:

```
xinghuo_app_id = xxxxxxxx
xinghuo_api_secret = xxxxxxxx
xinghuo_api_key = xxxxxxxx
```

可选内容:
```
xinghuo_enable_private_chat = True   # 私聊开关,默认开启,改为False关闭
xinghuo_api_version = ""    #星火大模型的版本,默认为v1.5。使用2.0版本请填入v2,使用3.0版本请填入v3。使用助手API请输入助手id,在https://xinghuo.xfyun.cn/botcenter/createbot获取
```


# 使用方法

- @机器人进行问答时,机器人没有上下文回复的能力
- xh 使用该命令进行问答时,机器人具有上下文回复的能力
- xh_clear 清除当前用户的聊天记录

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nonebot-plugin-xinghuo-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Alpaca",
    "author_email": "alpaca@bupt.edu.cn",
    "download_url": "https://files.pythonhosted.org/packages/b3/bd/72bb6a9a16a5eea12c7e5627332fd503bc3d39148199cf9e33a68e1f3394/nonebot_plugin_xinghuo_api-2.2.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n  <br>\n  <p><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-chatgpt-turbo\n</div>\n\n# \u4ecb\u7ecd\n- \u672c\u63d2\u4ef6\u662f\u9002\u914d\u79d1\u5927\u8baf\u98de\u661f\u706b\u5927\u6a21\u578b\u5b98\u65b9API\u7684\u804a\u5929\u673a\u5668\u4eba\u63d2\u4ef6\uff0c\u540c\u65f6\u5177\u6709\u4e0a\u4e0b\u6587\u8bb0\u5fc6\u56de\u590d\u529f\u80fd\u3002\u5df2\u9002\u914dV3.0\u7248API\u53ca\u661f\u706b\u52a9\u624bAPI\u3002\n# \u5b89\u88c5\n\n* \u624b\u52a8\u5b89\u88c5\n  ```\n  git clone https://github.com/Alpaca4610/nonebot_plugin_xinghuo_api.git\n  ```\n\n  \u4e0b\u8f7d\u5b8c\u6210\u540e\u5728bot\u9879\u76ee\u7684pyproject.toml\u6587\u4ef6\u624b\u52a8\u6dfb\u52a0\u63d2\u4ef6\uff1a\n\n  ```\n  plugin_dirs = [\"xxxxxx\",\"xxxxxx\",......,\"\u4e0b\u8f7d\u5b8c\u6210\u7684\u63d2\u4ef6\u8def\u5f84/nonebot-plugin-xinghuo-api\"]\n  ```\n* \u4f7f\u7528 pip\n  ```\n  pip install nonebot-plugin-xinghuo-api\n  ```\n\n# \u914d\u7f6e\u6587\u4ef6\n\n\u5fc5\u9009\u5185\u5bb9: \u5728Bot\u6839\u76ee\u5f55\u4e0b\u7684.env\u6587\u4ef6\u4e2d\u586b\u5165\u79d1\u5927\u8baf\u98de\u63d0\u4f9b\u7684API\u8c03\u7528\u9274\u6743\u4fe1\u606f\uff1a\n\n```\nxinghuo_app_id = xxxxxxxx\nxinghuo_api_secret = xxxxxxxx\nxinghuo_api_key = xxxxxxxx\n```\n\n\u53ef\u9009\u5185\u5bb9\uff1a\n```\nxinghuo_enable_private_chat = True   # \u79c1\u804a\u5f00\u5173\uff0c\u9ed8\u8ba4\u5f00\u542f\uff0c\u6539\u4e3aFalse\u5173\u95ed\nxinghuo_api_version = \"\"    #\u661f\u706b\u5927\u6a21\u578b\u7684\u7248\u672c\uff0c\u9ed8\u8ba4\u4e3av1.5\u3002\u4f7f\u75282.0\u7248\u672c\u8bf7\u586b\u5165v2\uff0c\u4f7f\u75283.0\u7248\u672c\u8bf7\u586b\u5165v3\u3002\u4f7f\u7528\u52a9\u624bAPI\u8bf7\u8f93\u5165\u52a9\u624bid\uff0c\u5728https://xinghuo.xfyun.cn/botcenter/createbot\u83b7\u53d6\n```\n\n\n# \u4f7f\u7528\u65b9\u6cd5\n\n- @\u673a\u5668\u4eba\u8fdb\u884c\u95ee\u7b54\u65f6\uff0c\u673a\u5668\u4eba\u6ca1\u6709\u4e0a\u4e0b\u6587\u56de\u590d\u7684\u80fd\u529b\n- xh \u4f7f\u7528\u8be5\u547d\u4ee4\u8fdb\u884c\u95ee\u7b54\u65f6\uff0c\u673a\u5668\u4eba\u5177\u6709\u4e0a\u4e0b\u6587\u56de\u590d\u7684\u80fd\u529b\n- xh_clear \u6e05\u9664\u5f53\u524d\u7528\u6237\u7684\u804a\u5929\u8bb0\u5f55\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A nonebot plugin for xinghuo LLM",
    "version": "2.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "930f179ed6629c6cceba771da8a511c05bdfcc0c1bdc5ccb18e994fdeb1d3687",
                "md5": "9780801de26d9798daacc5b331161a17",
                "sha256": "e3f68bcf9493106a7daa51a9097258450139f965057673cf9874ddc3ac9f99f9"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_xinghuo_api-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9780801de26d9798daacc5b331161a17",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 6849,
            "upload_time": "2024-01-31T04:22:26",
            "upload_time_iso_8601": "2024-01-31T04:22:26.549372Z",
            "url": "https://files.pythonhosted.org/packages/93/0f/179ed6629c6cceba771da8a511c05bdfcc0c1bdc5ccb18e994fdeb1d3687/nonebot_plugin_xinghuo_api-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3bd72bb6a9a16a5eea12c7e5627332fd503bc3d39148199cf9e33a68e1f3394",
                "md5": "d2b2c97c19226cf3a518ec29f9bdde4a",
                "sha256": "9139f19bc66c1c500dce6c0ff93e694a0ff1ad68abd5cf164f8db7ed6e7cfcdf"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_xinghuo_api-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d2b2c97c19226cf3a518ec29f9bdde4a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 5843,
            "upload_time": "2024-01-31T04:22:28",
            "upload_time_iso_8601": "2024-01-31T04:22:28.026091Z",
            "url": "https://files.pythonhosted.org/packages/b3/bd/72bb6a9a16a5eea12c7e5627332fd503bc3d39148199cf9e33a68e1f3394/nonebot_plugin_xinghuo_api-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 04:22:28",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nonebot-plugin-xinghuo-api"
}
        
Elapsed time: 0.17385s