nonebot-plugin-talk-with-eop-ai


Namenonebot-plugin-talk-with-eop-ai JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/nikissXI/nonebot_plugins/tree/main/nonebot_plugin_talk_with_eop_ai
SummaryNonebot2 一款调用eop api的AI聊天插件
upload_time2023-10-05 12:14:17
maintainer
docs_urlNone
authornikissXI
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://v2.nonebot.dev/store">
  <img src="https://user-images.githubusercontent.com/44545625/209862575-acdc9feb-3c76-471d-ad89-cc78927e5875.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
</p>

<div align="center">

# nonebot_plugin_talk_with_eop_ai

_✨ Nonebot2 一款调用eop api的AI聊天插件 ✨_

</div>
<p align="center">
  <a href="https://opensource.org/licenses/MIT">
    <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="license">
  </a>
  <a href="https://v2.nonebot.dev/">
    <img src="https://img.shields.io/static/v1?label=nonebot&message=v2rc1%2B&color=green" alt="nonebot2">
  </a>
  <img src="https://img.shields.io/static/v1?label=python+&message=3.8%2B&color=blue" alt="python">
</p>

## 简介
本插件需要调用一个逆向poe前端写的后端,也是我负责开发维护的,[eop-next-api仓库](https://github.com/nikissXI/eop-next-api)。  
后端可以自行部署,或者付费租用我的,目前价格15元/月,带前端,免梯直连,图省事且不差钱的可以加我QQ129957715了解。  
<img width="100%" src="https://raw.githubusercontent.com/nikissXI/nonebot_plugins/main/nonebot_plugin_talk_with_poe_ai/readme_img/1.jpg"/>  


## 安装

使用nb-cli安装
```bash
nb plugin install nonebot_plugin_talk_with_eop_ai
```

或者  
直接把插件clone下来放进去plugins文件夹,依赖库自己补全  

可选安装ujson进行解析json数据  

## 配置
在bot对应的.env文件修改,文档中的均是默认值。  

#### 必填项
```bash
# eop后端url地址,如 https://api.eop.com
eop_ai_base_addr = 
# eop登录账号密码
eop_ai_user = username
eop_ai_passwd = password
```

#### 大概率用得上的选填项
```bash
# 代理地址,当前仅支持http代理
eop_ai_http_proxy_addr = http://127.0.0.1:7890
# AI回答是否使用图片输出(建议开启)
eop_ai_reply_with_img = true
# 处理消息时是否提示(不嫌烦或测试的时候可以打开)
eop_ai_reply_notice = false
# 群聊是否共享会话
eop_ai_group_share = true
# 是否默认允许所有群聊使用,否则需要使用命令启用(默认 /eopai)
eop_ai_all_group_enable = true
```

#### 如果要修改触发命令就填
```bash
# 群聊艾特是否响应(需要先启用该群的eop ai)
eop_ai_talk_at = false
# 如果关闭所有群聊使用,启用该群的命令
eop_ai_group_enable_cmd = /eopai
# 触发对话的命令前缀,如果eop_ai_talk_at为true直接艾特即可
eop_ai_talk_cmd = /talk
# 私聊沉浸式对话触发命令
eop_ai_talk_p_cmd = /hi
# 重置对话,就是清空聊天记录
eop_ai_reset_cmd = /reset
```

#### 大概率用不上的选填项
```bash
# 机器人的QQ号列表,选填
# 如果有多个bot连接,会按照填写的list,左边的机器人QQ优先级最高 1234 > 5678 > 6666,会自动切换
# 如果不填该配置则由第一个连上的bot响应,所以单bot连可以不填,写 ["all"]则所有机器人均响应
eop_ai_bot_qqnum_list = [1234, 5678, 6666]
# 插件数据文件名,默认./data/talk_with_eop_ai.json
eop_ai_data = eop_ai.json
```

## 插件命令(均可修改!) 
| 指令 | 说明 |
|:-----:|:----:|
| /eopai | 如果eop_ai_group_enable_cmd为false,则用该命令启用 |
| /talk | 开始对话,默认群里@机器人也可以 |
| /hi | 沉浸式对话(仅限私聊) |
| /reset | 重置对话 |

## 更新日志

### 2023/10/5 \[v0.1.0]

* 发布插件

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nikissXI/nonebot_plugins/tree/main/nonebot_plugin_talk_with_eop_ai",
    "name": "nonebot-plugin-talk-with-eop-ai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "nikissXI",
    "author_email": "1299577815@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/b8/b2/63b282d348287cffb717c8ddae5a55d5f609f3a9b55553a7024d422c15e2/nonebot_plugin_talk_with_eop_ai-0.1.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\">\n  <img src=\"https://user-images.githubusercontent.com/44545625/209862575-acdc9feb-3c76-471d-ad89-cc78927e5875.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n</p>\n\n<div align=\"center\">\n\n# nonebot_plugin_talk_with_eop_ai\n\n_\u2728 Nonebot2 \u4e00\u6b3e\u8c03\u7528eop api\u7684AI\u804a\u5929\u63d2\u4ef6 \u2728_\n\n</div>\n<p align=\"center\">\n  <a href=\"https://opensource.org/licenses/MIT\">\n    <img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"license\">\n  </a>\n  <a href=\"https://v2.nonebot.dev/\">\n    <img src=\"https://img.shields.io/static/v1?label=nonebot&message=v2rc1%2B&color=green\" alt=\"nonebot2\">\n  </a>\n  <img src=\"https://img.shields.io/static/v1?label=python+&message=3.8%2B&color=blue\" alt=\"python\">\n</p>\n\n## \u7b80\u4ecb\n\u672c\u63d2\u4ef6\u9700\u8981\u8c03\u7528\u4e00\u4e2a\u9006\u5411poe\u524d\u7aef\u5199\u7684\u540e\u7aef\uff0c\u4e5f\u662f\u6211\u8d1f\u8d23\u5f00\u53d1\u7ef4\u62a4\u7684\uff0c[eop-next-api\u4ed3\u5e93](https://github.com/nikissXI/eop-next-api)\u3002  \n\u540e\u7aef\u53ef\u4ee5\u81ea\u884c\u90e8\u7f72\uff0c\u6216\u8005\u4ed8\u8d39\u79df\u7528\u6211\u7684\uff0c\u76ee\u524d\u4ef7\u683c15\u5143/\u6708\uff0c\u5e26\u524d\u7aef\uff0c\u514d\u68af\u76f4\u8fde\uff0c\u56fe\u7701\u4e8b\u4e14\u4e0d\u5dee\u94b1\u7684\u53ef\u4ee5\u52a0\u6211QQ129957715\u4e86\u89e3\u3002  \n<img width=\"100%\" src=\"https://raw.githubusercontent.com/nikissXI/nonebot_plugins/main/nonebot_plugin_talk_with_poe_ai/readme_img/1.jpg\"/>  \n\n\n## \u5b89\u88c5\n\n\u4f7f\u7528nb-cli\u5b89\u88c5\n```bash\nnb plugin install nonebot_plugin_talk_with_eop_ai\n```\n\n\u6216\u8005  \n\u76f4\u63a5\u628a\u63d2\u4ef6clone\u4e0b\u6765\u653e\u8fdb\u53bbplugins\u6587\u4ef6\u5939\uff0c\u4f9d\u8d56\u5e93\u81ea\u5df1\u8865\u5168  \n\n\u53ef\u9009\u5b89\u88c5ujson\u8fdb\u884c\u89e3\u6790json\u6570\u636e  \n\n## \u914d\u7f6e\n\u5728bot\u5bf9\u5e94\u7684.env\u6587\u4ef6\u4fee\u6539\uff0c\u6587\u6863\u4e2d\u7684\u5747\u662f\u9ed8\u8ba4\u503c\u3002  \n\n#### \u5fc5\u586b\u9879\n```bash\n# eop\u540e\u7aefurl\u5730\u5740\uff0c\u5982 https://api.eop.com\neop_ai_base_addr = \n# eop\u767b\u5f55\u8d26\u53f7\u5bc6\u7801\neop_ai_user = username\neop_ai_passwd = password\n```\n\n#### \u5927\u6982\u7387\u7528\u5f97\u4e0a\u7684\u9009\u586b\u9879\n```bash\n# \u4ee3\u7406\u5730\u5740\uff0c\u5f53\u524d\u4ec5\u652f\u6301http\u4ee3\u7406\neop_ai_http_proxy_addr = http://127.0.0.1:7890\n# AI\u56de\u7b54\u662f\u5426\u4f7f\u7528\u56fe\u7247\u8f93\u51fa\uff08\u5efa\u8bae\u5f00\u542f\uff09\neop_ai_reply_with_img = true\n# \u5904\u7406\u6d88\u606f\u65f6\u662f\u5426\u63d0\u793a\uff08\u4e0d\u5acc\u70e6\u6216\u6d4b\u8bd5\u7684\u65f6\u5019\u53ef\u4ee5\u6253\u5f00\uff09\neop_ai_reply_notice = false\n# \u7fa4\u804a\u662f\u5426\u5171\u4eab\u4f1a\u8bdd\neop_ai_group_share = true\n# \u662f\u5426\u9ed8\u8ba4\u5141\u8bb8\u6240\u6709\u7fa4\u804a\u4f7f\u7528\uff0c\u5426\u5219\u9700\u8981\u4f7f\u7528\u547d\u4ee4\u542f\u7528\uff08\u9ed8\u8ba4 /eopai\uff09\neop_ai_all_group_enable = true\n```\n\n#### \u5982\u679c\u8981\u4fee\u6539\u89e6\u53d1\u547d\u4ee4\u5c31\u586b\n```bash\n# \u7fa4\u804a\u827e\u7279\u662f\u5426\u54cd\u5e94\uff08\u9700\u8981\u5148\u542f\u7528\u8be5\u7fa4\u7684eop ai\uff09\neop_ai_talk_at = false\n# \u5982\u679c\u5173\u95ed\u6240\u6709\u7fa4\u804a\u4f7f\u7528\uff0c\u542f\u7528\u8be5\u7fa4\u7684\u547d\u4ee4\neop_ai_group_enable_cmd = /eopai\n# \u89e6\u53d1\u5bf9\u8bdd\u7684\u547d\u4ee4\u524d\u7f00\uff0c\u5982\u679ceop_ai_talk_at\u4e3atrue\u76f4\u63a5\u827e\u7279\u5373\u53ef\neop_ai_talk_cmd = /talk\n# \u79c1\u804a\u6c89\u6d78\u5f0f\u5bf9\u8bdd\u89e6\u53d1\u547d\u4ee4\neop_ai_talk_p_cmd = /hi\n# \u91cd\u7f6e\u5bf9\u8bdd\uff0c\u5c31\u662f\u6e05\u7a7a\u804a\u5929\u8bb0\u5f55\neop_ai_reset_cmd = /reset\n```\n\n#### \u5927\u6982\u7387\u7528\u4e0d\u4e0a\u7684\u9009\u586b\u9879\n```bash\n# \u673a\u5668\u4eba\u7684QQ\u53f7\u5217\u8868\uff0c\u9009\u586b\n# \u5982\u679c\u6709\u591a\u4e2abot\u8fde\u63a5\uff0c\u4f1a\u6309\u7167\u586b\u5199\u7684list\uff0c\u5de6\u8fb9\u7684\u673a\u5668\u4ebaQQ\u4f18\u5148\u7ea7\u6700\u9ad8 1234 > 5678 > 6666\uff0c\u4f1a\u81ea\u52a8\u5207\u6362\n# \u5982\u679c\u4e0d\u586b\u8be5\u914d\u7f6e\u5219\u7531\u7b2c\u4e00\u4e2a\u8fde\u4e0a\u7684bot\u54cd\u5e94\uff0c\u6240\u4ee5\u5355bot\u8fde\u53ef\u4ee5\u4e0d\u586b\uff0c\u5199 [\"all\"]\u5219\u6240\u6709\u673a\u5668\u4eba\u5747\u54cd\u5e94\neop_ai_bot_qqnum_list = [1234, 5678, 6666]\n# \u63d2\u4ef6\u6570\u636e\u6587\u4ef6\u540d\uff0c\u9ed8\u8ba4./data/talk_with_eop_ai.json\neop_ai_data = eop_ai.json\n```\n\n## \u63d2\u4ef6\u547d\u4ee4\uff08\u5747\u53ef\u4fee\u6539\uff01\uff09 \n| \u6307\u4ee4 | \u8bf4\u660e |\n|:-----:|:----:|\n| /eopai | \u5982\u679ceop_ai_group_enable_cmd\u4e3afalse\uff0c\u5219\u7528\u8be5\u547d\u4ee4\u542f\u7528 |\n| /talk | \u5f00\u59cb\u5bf9\u8bdd\uff0c\u9ed8\u8ba4\u7fa4\u91cc@\u673a\u5668\u4eba\u4e5f\u53ef\u4ee5 |\n| /hi | \u6c89\u6d78\u5f0f\u5bf9\u8bdd\uff08\u4ec5\u9650\u79c1\u804a\uff09 |\n| /reset | \u91cd\u7f6e\u5bf9\u8bdd |\n\n## \u66f4\u65b0\u65e5\u5fd7\n\n### 2023/10/5 \\[v0.1.0]\n\n* \u53d1\u5e03\u63d2\u4ef6\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Nonebot2 \u4e00\u6b3e\u8c03\u7528eop api\u7684AI\u804a\u5929\u63d2\u4ef6",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://github.com/nikissXI/nonebot_plugins/tree/main/nonebot_plugin_talk_with_eop_ai#README.md",
        "Homepage": "https://github.com/nikissXI/nonebot_plugins/tree/main/nonebot_plugin_talk_with_eop_ai",
        "Repository": "https://github.com/nikissXI/nonebot_plugins/tree/main/nonebot_plugin_talk_with_eop_ai"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41a72ebcd67e3f48e8390a748e3d09c5db5b54fd21fcc6bae7727a024cdd68af",
                "md5": "fb8f81c6b270ff58b3e085d6dd20d57a",
                "sha256": "531c645cc3a12a6be5bc725ec8c912772d364840c12cd2c5b3658d3d2e9550bc"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_talk_with_eop_ai-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb8f81c6b270ff58b3e085d6dd20d57a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10524,
            "upload_time": "2023-10-05T12:14:15",
            "upload_time_iso_8601": "2023-10-05T12:14:15.576240Z",
            "url": "https://files.pythonhosted.org/packages/41/a7/2ebcd67e3f48e8390a748e3d09c5db5b54fd21fcc6bae7727a024cdd68af/nonebot_plugin_talk_with_eop_ai-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8b263b282d348287cffb717c8ddae5a55d5f609f3a9b55553a7024d422c15e2",
                "md5": "b7e9ebb8dd35f156c5df13a4ce7d6b6e",
                "sha256": "5c26cb25336b1e1ed77ca581b1844f3244299f81c05e6c2aa013e9e16021c2aa"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_talk_with_eop_ai-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b7e9ebb8dd35f156c5df13a4ce7d6b6e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8250,
            "upload_time": "2023-10-05T12:14:17",
            "upload_time_iso_8601": "2023-10-05T12:14:17.515379Z",
            "url": "https://files.pythonhosted.org/packages/b8/b2/63b282d348287cffb717c8ddae5a55d5f609f3a9b55553a7024d422c15e2/nonebot_plugin_talk_with_eop_ai-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-05 12:14:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nikissXI",
    "github_project": "nonebot_plugins",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nonebot-plugin-talk-with-eop-ai"
}
        
Elapsed time: 0.17369s