nonebot-plugin-chatpdf


Namenonebot-plugin-chatpdf JSON
Version 0.4.0 PyPI version JSON
download
home_page
SummaryA nonebot plugin for chatpdf
upload_time2023-03-24 07:41:24
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-chatpdf

</div>

# 介绍

- 本插件灵感来源于最近很火的 [chatpdf](https://www.chatpdf.com)。
- 将需要分析的论文/阅读材料上传到群文件,机器人可以对其进行存储分析,然后你可以向其提问有关文章内容、文章概要、对于文章的思考等问题
- 本插件参考和使用了项目 [Document_QA](https://github.com/fierceX/Document_QA) 中的核心代码

# 效果

![Alt](./img/img2.jpg)

# 安装

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

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

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

# 配置文件

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

```
OPENAI_API_KEY = key
```

可选内容:

```
OPENAI_HTTP_PROXY = "http://127.0.0.1:8001"    # 设置代理解决OPENAI的网络问题
```

# 使用方法

如果设置了nonebot全局触发前缀,需要在下面的命令前加上设置的前缀。

### 使用方式:上传需要分析的pdf文件到群文件中

- /start (使用该命令以上传pdf文件的方式启动chatpdf文章分析功能)
- 在一分钟内,上传需要分析的pdf文件到群文件中,分析完成后会返回成功信息
- /chat_pdf (文章分析完成后,使用该命令后面接需要提问的关于文章的问题,机器人会给出答案)
- /delete_all (删除所有缓存)
- /delete_my (删除用户在本群的缓存)


# 注意事项

- 每次调用/start命令时,都会清除调用者以前的分析缓存


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nonebot-plugin-chatpdf",
    "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/f7/2c/c1ef137a252ae8d566ac010890ded11e67c35e7079a6c24d5a8f65296e62/nonebot_plugin_chatpdf-0.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-chatpdf\n\n</div>\n\n# \u4ecb\u7ecd\n\n- \u672c\u63d2\u4ef6\u7075\u611f\u6765\u6e90\u4e8e\u6700\u8fd1\u5f88\u706b\u7684 [chatpdf](https://www.chatpdf.com)\u3002\n- \u5c06\u9700\u8981\u5206\u6790\u7684\u8bba\u6587/\u9605\u8bfb\u6750\u6599\u4e0a\u4f20\u5230\u7fa4\u6587\u4ef6\uff0c\u673a\u5668\u4eba\u53ef\u4ee5\u5bf9\u5176\u8fdb\u884c\u5b58\u50a8\u5206\u6790\uff0c\u7136\u540e\u4f60\u53ef\u4ee5\u5411\u5176\u63d0\u95ee\u6709\u5173\u6587\u7ae0\u5185\u5bb9\u3001\u6587\u7ae0\u6982\u8981\u3001\u5bf9\u4e8e\u6587\u7ae0\u7684\u601d\u8003\u7b49\u95ee\u9898\n- \u672c\u63d2\u4ef6\u53c2\u8003\u548c\u4f7f\u7528\u4e86\u9879\u76ee [Document_QA](https://github.com/fierceX/Document_QA) \u4e2d\u7684\u6838\u5fc3\u4ee3\u7801\n\n# \u6548\u679c\n\n![Alt](./img/img2.jpg)\n\n# \u5b89\u88c5\n\n* \u624b\u52a8\u5b89\u88c5\n  ```\n  git clone https://github.com/Alpaca4610/nonebot_plugin_chatpdf.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-chatpdf\"]\n  ```\n* \u4f7f\u7528 pip\n  ```\n  pip install nonebot-plugin-chatgpt-chatpdf\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```\nOPENAI_API_KEY = key\n```\n\n\u53ef\u9009\u5185\u5bb9\uff1a\n\n```\nOPENAI_HTTP_PROXY = \"http://127.0.0.1:8001\"    # \u8bbe\u7f6e\u4ee3\u7406\u89e3\u51b3OPENAI\u7684\u7f51\u7edc\u95ee\u9898\n```\n\n# \u4f7f\u7528\u65b9\u6cd5\n\n\u5982\u679c\u8bbe\u7f6e\u4e86nonebot\u5168\u5c40\u89e6\u53d1\u524d\u7f00\uff0c\u9700\u8981\u5728\u4e0b\u9762\u7684\u547d\u4ee4\u524d\u52a0\u4e0a\u8bbe\u7f6e\u7684\u524d\u7f00\u3002\n\n### \u4f7f\u7528\u65b9\u5f0f\uff1a\u4e0a\u4f20\u9700\u8981\u5206\u6790\u7684pdf\u6587\u4ef6\u5230\u7fa4\u6587\u4ef6\u4e2d\n\n- /start (\u4f7f\u7528\u8be5\u547d\u4ee4\u4ee5\u4e0a\u4f20pdf\u6587\u4ef6\u7684\u65b9\u5f0f\u542f\u52a8chatpdf\u6587\u7ae0\u5206\u6790\u529f\u80fd)\n- \u5728\u4e00\u5206\u949f\u5185\uff0c\u4e0a\u4f20\u9700\u8981\u5206\u6790\u7684pdf\u6587\u4ef6\u5230\u7fa4\u6587\u4ef6\u4e2d\uff0c\u5206\u6790\u5b8c\u6210\u540e\u4f1a\u8fd4\u56de\u6210\u529f\u4fe1\u606f\n- /chat_pdf (\u6587\u7ae0\u5206\u6790\u5b8c\u6210\u540e\uff0c\u4f7f\u7528\u8be5\u547d\u4ee4\u540e\u9762\u63a5\u9700\u8981\u63d0\u95ee\u7684\u5173\u4e8e\u6587\u7ae0\u7684\u95ee\u9898\uff0c\u673a\u5668\u4eba\u4f1a\u7ed9\u51fa\u7b54\u6848)\n- /delete_all (\u5220\u9664\u6240\u6709\u7f13\u5b58)\n- /delete_my \uff08\u5220\u9664\u7528\u6237\u5728\u672c\u7fa4\u7684\u7f13\u5b58\uff09\n\n\n# \u6ce8\u610f\u4e8b\u9879\n\n- \u6bcf\u6b21\u8c03\u7528/start\u547d\u4ee4\u65f6\uff0c\u90fd\u4f1a\u6e05\u9664\u8c03\u7528\u8005\u4ee5\u524d\u7684\u5206\u6790\u7f13\u5b58\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A nonebot plugin for chatpdf",
    "version": "0.4.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "128d73f047e4876582adc980ee30156a2e2e27efc91ab732dd284d864642354a",
                "md5": "80dee7c2407270a554c79d809c632898",
                "sha256": "88f7574aee458a98bfa0929e196cb517b2498c70d4d240b5b88fa101bca4c515"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_chatpdf-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80dee7c2407270a554c79d809c632898",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 5735,
            "upload_time": "2023-03-24T07:41:22",
            "upload_time_iso_8601": "2023-03-24T07:41:22.586069Z",
            "url": "https://files.pythonhosted.org/packages/12/8d/73f047e4876582adc980ee30156a2e2e27efc91ab732dd284d864642354a/nonebot_plugin_chatpdf-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f72cc1ef137a252ae8d566ac010890ded11e67c35e7079a6c24d5a8f65296e62",
                "md5": "b7670cd49bda6dbe8ef86ef89a45c530",
                "sha256": "9e4aa17ee23234018858fcb9bcbc7ba0e8b2cb4195b82192a6f14cf58d16730f"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_chatpdf-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b7670cd49bda6dbe8ef86ef89a45c530",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 5344,
            "upload_time": "2023-03-24T07:41:24",
            "upload_time_iso_8601": "2023-03-24T07:41:24.253333Z",
            "url": "https://files.pythonhosted.org/packages/f7/2c/c1ef137a252ae8d566ac010890ded11e67c35e7079a6c24d5a8f65296e62/nonebot_plugin_chatpdf-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-24 07:41:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "nonebot-plugin-chatpdf"
}
        
Elapsed time: 0.04872s