nonebot-plugin-chatgpt-turbo


Namenonebot-plugin-chatgpt-turbo JSON
Version 1.1.1 PyPI version JSON
download
home_pageNone
SummaryA nonebot plugin for oneapi and openai
upload_time2025-01-26 09:58:13
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-chatgpt-turbo
</div>

# 介绍
- 本插件适配DeepSeek、OneAPI和OpenAI接口,可以在nonebot中调用OpenAI官方或是OneAPI(gpt,gemini,Claude系列模型)接口的模型进行回复
- 支持DeepSeek-R1思维链回复
- 本插件具有上下文回复和多模态识别(识图)功能(需要模型支持)

# 安装

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

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

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

# 配置文件

在Bot根目录下的.env文件中追加如下内容:

```
oneapi_key = ""  # OpenAI官方或者是支持OneAPI的大模型中转服务商提供的KEY
oneapi_model = "gpt-4o" # 使用的语言大模型,使用识图功能请填写合适的大模型名称
```

可选内容:
```
oneapi_url = ""  # (可选)大模型中转服务商提供的中转地址,使用OpenAI官方服务不需要填写
enable_private_chat = True   # 私聊开关,默认开启,改为False关闭
r1_reason = True  # DeepSeek-R1模型思维链显示开关
```

# 效果
![](demo.jpg)
![](demo2.png)
![](demo3.png)

# 使用方法

- @机器人发送问题时机器人不具有上下文回复的能力
- chat 使用该命令进行问答时,机器人具有上下文回复的能力
- clear 清除当前用户的聊天记录

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nonebot-plugin-chatgpt-turbo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alpaca",
    "author_email": "alpaca@bupt.edu.cn",
    "download_url": "https://files.pythonhosted.org/packages/66/a9/73f41b0faea86cf1d75cfead24f4edf978260f59960f7a56b9d4797d853a/nonebot_plugin_chatgpt_turbo-1.1.1.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\u9002\u914dDeepSeek\u3001OneAPI\u548cOpenAI\u63a5\u53e3\uff0c\u53ef\u4ee5\u5728nonebot\u4e2d\u8c03\u7528OpenAI\u5b98\u65b9\u6216\u662fOneAPI(gpt,gemini,Claude\u7cfb\u5217\u6a21\u578b)\u63a5\u53e3\u7684\u6a21\u578b\u8fdb\u884c\u56de\u590d\n- \u652f\u6301DeepSeek-R1\u601d\u7ef4\u94fe\u56de\u590d\n- \u672c\u63d2\u4ef6\u5177\u6709\u4e0a\u4e0b\u6587\u56de\u590d\u548c\u591a\u6a21\u6001\u8bc6\u522b\uff08\u8bc6\u56fe\uff09\u529f\u80fd\uff08\u9700\u8981\u6a21\u578b\u652f\u6301\uff09\n\n# \u5b89\u88c5\n\n* \u624b\u52a8\u5b89\u88c5\n  ```\n  git clone https://github.com/Alpaca4610/nonebot_plugin_chatgpt_turbo.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-gpt3.5-turbo\"]\n  ```\n* \u4f7f\u7528 pip\n  ```\n  pip install nonebot-plugin-chatgpt-turbo\n  ```\n\n# \u914d\u7f6e\u6587\u4ef6\n\n\u5728Bot\u6839\u76ee\u5f55\u4e0b\u7684.env\u6587\u4ef6\u4e2d\u8ffd\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a\n\n```\noneapi_key = \"\"  # OpenAI\u5b98\u65b9\u6216\u8005\u662f\u652f\u6301OneAPI\u7684\u5927\u6a21\u578b\u4e2d\u8f6c\u670d\u52a1\u5546\u63d0\u4f9b\u7684KEY\noneapi_model = \"gpt-4o\" # \u4f7f\u7528\u7684\u8bed\u8a00\u5927\u6a21\u578b\uff0c\u4f7f\u7528\u8bc6\u56fe\u529f\u80fd\u8bf7\u586b\u5199\u5408\u9002\u7684\u5927\u6a21\u578b\u540d\u79f0\n```\n\n\u53ef\u9009\u5185\u5bb9\uff1a\n```\noneapi_url = \"\"  # \uff08\u53ef\u9009\uff09\u5927\u6a21\u578b\u4e2d\u8f6c\u670d\u52a1\u5546\u63d0\u4f9b\u7684\u4e2d\u8f6c\u5730\u5740\uff0c\u4f7f\u7528OpenAI\u5b98\u65b9\u670d\u52a1\u4e0d\u9700\u8981\u586b\u5199\nenable_private_chat = True   # \u79c1\u804a\u5f00\u5173\uff0c\u9ed8\u8ba4\u5f00\u542f\uff0c\u6539\u4e3aFalse\u5173\u95ed\nr1_reason = True  # DeepSeek-R1\u6a21\u578b\u601d\u7ef4\u94fe\u663e\u793a\u5f00\u5173\n```\n\n# \u6548\u679c\n![](demo.jpg)\n![](demo2.png)\n![](demo3.png)\n\n# \u4f7f\u7528\u65b9\u6cd5\n\n- @\u673a\u5668\u4eba\u53d1\u9001\u95ee\u9898\u65f6\u673a\u5668\u4eba\u4e0d\u5177\u6709\u4e0a\u4e0b\u6587\u56de\u590d\u7684\u80fd\u529b\n- chat \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- clear \u6e05\u9664\u5f53\u524d\u7528\u6237\u7684\u804a\u5929\u8bb0\u5f55\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A nonebot plugin for oneapi and openai",
    "version": "1.1.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90526af69ffe8c59966eb18b11103a9d6fdaf3621a50866784c7128acfef6d5b",
                "md5": "93249f5e8546811d864a9fa3cc97e7e1",
                "sha256": "0c9a6958567c405b547b6c30d5332de8cdf5623c2c344c883530126d4dc4c6f9"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_chatgpt_turbo-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "93249f5e8546811d864a9fa3cc97e7e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 5215,
            "upload_time": "2025-01-26T09:58:12",
            "upload_time_iso_8601": "2025-01-26T09:58:12.318556Z",
            "url": "https://files.pythonhosted.org/packages/90/52/6af69ffe8c59966eb18b11103a9d6fdaf3621a50866784c7128acfef6d5b/nonebot_plugin_chatgpt_turbo-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66a973f41b0faea86cf1d75cfead24f4edf978260f59960f7a56b9d4797d853a",
                "md5": "18dd75b98b3dcb1911a1b9f26bdd28d0",
                "sha256": "9a7aca44107f025e82e6bc94ab70e3f4483cc1d7f68638bb5937215cd9e5de1b"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_chatgpt_turbo-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "18dd75b98b3dcb1911a1b9f26bdd28d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 4212,
            "upload_time": "2025-01-26T09:58:13",
            "upload_time_iso_8601": "2025-01-26T09:58:13.833102Z",
            "url": "https://files.pythonhosted.org/packages/66/a9/73f41b0faea86cf1d75cfead24f4edf978260f59960f7a56b9d4797d853a/nonebot_plugin_chatgpt_turbo-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-26 09:58:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nonebot-plugin-chatgpt-turbo"
}
        
Elapsed time: 0.43075s