nonebot-plugin-xinghuo-api


Namenonebot-plugin-xinghuo-api JSON
Version 2.4.0 PyPI version JSON
download
home_pageNone
SummaryA nonebot plugin for xinghuo LLM
upload_time2024-12-11 13:01:53
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
xinghuo_api_prompt = "" # 星火大模型人格prompt,留空默认不开启,人格设置是否成功与人格prompt有关
```

# 使用方法

- 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/13/83/9918e7bdd2c2fb78ed905d1caa981aa14f206e89d8e798538a5b5aa1627b/nonebot_plugin_xinghuo_api-2.4.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\u548c\u81ea\u5b9a\u4e49\u4eba\u683c\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\nxinghuo_api_prompt = \"\" # \u661f\u706b\u5927\u6a21\u578b\u4eba\u683cprompt\uff0c\u7559\u7a7a\u9ed8\u8ba4\u4e0d\u5f00\u542f\uff0c\u4eba\u683c\u8bbe\u7f6e\u662f\u5426\u6210\u529f\u4e0e\u4eba\u683cprompt\u6709\u5173\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.4.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "326e62f4b51f8c9fa064fb9b4fe2372cb182defabf587fa61bbebaba55073e4f",
                "md5": "5187696ef099513e4f8d82154e45874a",
                "sha256": "4c2583665a1faad1fc0954ba0986d4503b14faf2a198ab520028e6795231c15b"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_xinghuo_api-2.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5187696ef099513e4f8d82154e45874a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 5086,
            "upload_time": "2024-12-11T13:01:50",
            "upload_time_iso_8601": "2024-12-11T13:01:50.556588Z",
            "url": "https://files.pythonhosted.org/packages/32/6e/62f4b51f8c9fa064fb9b4fe2372cb182defabf587fa61bbebaba55073e4f/nonebot_plugin_xinghuo_api-2.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13839918e7bdd2c2fb78ed905d1caa981aa14f206e89d8e798538a5b5aa1627b",
                "md5": "7e5fc15f3cce95e5aeed2d469f6cfb2b",
                "sha256": "87ec11a62ba24b52d5f9949f8ab6f57d904e257e1d71b3ad98a422f5caa5e4a6"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_xinghuo_api-2.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7e5fc15f3cce95e5aeed2d469f6cfb2b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 4226,
            "upload_time": "2024-12-11T13:01:53",
            "upload_time_iso_8601": "2024-12-11T13:01:53.252029Z",
            "url": "https://files.pythonhosted.org/packages/13/83/9918e7bdd2c2fb78ed905d1caa981aa14f206e89d8e798538a5b5aa1627b/nonebot_plugin_xinghuo_api-2.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 13:01:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nonebot-plugin-xinghuo-api"
}
        
Elapsed time: 0.69934s