nonebot-plugin-xinghuo-api


Namenonebot-plugin-xinghuo-api JSON
Version 2.3.0 PyPI version JSON
download
home_pageNone
SummaryA nonebot plugin for xinghuo LLM
upload_time2024-08-25 18:36:22
maintainerNone
docs_urlNone
authorAlpaca
requires_python<4.0,>=3.8
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-xinghuo-api
</div>

# 介绍
- 本插件是适配科大讯飞星火大模型官方API的聊天机器人插件,同时具有上下文记忆回复功能。已适配版本:Ultra,Max,Pro,Pro-128K,V2.0,Lite。
- 当前版本可能会与LittlePaimon机器人冲突
# 安装

* 手动安装
  ```
  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 = ""    #星火大模型的版本,默认为免费的Lite模型,可选填:Ultra,Max,Pro,Pro-128K,V2.0,Lite
```

# 使用方法

- xh 获取回复,没有上下文回复的能力
- XH 获取回复,具有上下文回复的能力
- xh_clear 清除当前用户的聊天记录

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nonebot-plugin-xinghuo-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alpaca",
    "author_email": "admin@alpaca.kim",
    "download_url": "https://files.pythonhosted.org/packages/98/1e/1eb1a1d1a23a78b58c414f86e8b93f65ad2b89ff9f37c9144f8e934c03a5/nonebot_plugin_xinghuo_api-2.3.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-xinghuo-api\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\u914d\u7248\u672c\uff1aUltra\uff0cMax\uff0cPro\uff0cPro-128K\uff0cV2.0\uff0cLite\u3002\n- \u5f53\u524d\u7248\u672c\u53ef\u80fd\u4f1a\u4e0eLittlePaimon\u673a\u5668\u4eba\u51b2\u7a81\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\u4e3a\u514d\u8d39\u7684Lite\u6a21\u578b\uff0c\u53ef\u9009\u586b\uff1aUltra\uff0cMax\uff0cPro\uff0cPro-128K\uff0cV2.0\uff0cLite\n```\n\n# \u4f7f\u7528\u65b9\u6cd5\n\n- xh \u83b7\u53d6\u56de\u590d\uff0c\u6ca1\u6709\u4e0a\u4e0b\u6587\u56de\u590d\u7684\u80fd\u529b\n- XH \u83b7\u53d6\u56de\u590d\uff0c\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.3.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80b5497fd8cf96e4c5b4b19cc6d15ee9b782be8bcb107fe6fa555ba2baf39125",
                "md5": "a0a6ea06590175991aaf053dd084e809",
                "sha256": "e9da7f7860a0152231ea6fe1f26c937cae0dd58453bc79076ab45cfe665a7cb6"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_xinghuo_api-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a0a6ea06590175991aaf053dd084e809",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 4939,
            "upload_time": "2024-08-25T18:36:20",
            "upload_time_iso_8601": "2024-08-25T18:36:20.853835Z",
            "url": "https://files.pythonhosted.org/packages/80/b5/497fd8cf96e4c5b4b19cc6d15ee9b782be8bcb107fe6fa555ba2baf39125/nonebot_plugin_xinghuo_api-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "981e1eb1a1d1a23a78b58c414f86e8b93f65ad2b89ff9f37c9144f8e934c03a5",
                "md5": "6e18e38d30c24e3f34be133219ffb231",
                "sha256": "5e8ac775cc6ad19a898f802e792433d11cb3f83c33e1de6df74c92f61eba12dc"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_xinghuo_api-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6e18e38d30c24e3f34be133219ffb231",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 4418,
            "upload_time": "2024-08-25T18:36:22",
            "upload_time_iso_8601": "2024-08-25T18:36:22.216626Z",
            "url": "https://files.pythonhosted.org/packages/98/1e/1eb1a1d1a23a78b58c414f86e8b93f65ad2b89ff9f37c9144f8e934c03a5/nonebot_plugin_xinghuo_api-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-25 18:36:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nonebot-plugin-xinghuo-api"
}
        
Elapsed time: 1.94722s