Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-chatpdf

介绍

  • 本插件灵感来源于最近很火的 chatpdf。
  • 将需要分析的论文/阅读材料上传到群文件,机器人可以对其进行存储分析,然后你可以向其提问有关文章内容、文章概要、对于文章的思考等问题
  • 本插件参考和使用了项目 Document_QA 中的核心代码
  • 本插件可选使用OneAPI格式的第三方中转站也可以使用OpenAI官方接口,但是在速率限制的情况下本插件可能无法使用。

效果

使用方法以最新说明为主

Alt

安装

  • 手动安装

    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文件中追加如下内容:

oneapi_key = "sk-xxxxxxxxxx"  # (必填)OpenAI官方或者是支持OneAPI的大模型中转服务商提供的KEY
oneapi_url = "https://xxxxxxxxx"  # (可选)大模型中转服务商提供的中转地址,使用OpenAI官方服务不需要填写
oneapi_model = "gpt-4" # (可选)使用的语言大模型

使用方法

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

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

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

注意事项

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

Release files for nonebot-plugin-chatpdf 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-chatpdf 1.0.0
File Size Uploaded
nonebot_plugin_chatpdf-1.0.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-chatpdf 1.0.0
File Interpreter ABI Platform
nonebot_plugin_chatpdf-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / nonebot_plugin_chatpdf-1.0.0.tar.gz

Download URL nonebot_plugin_chatpdf-1.0.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7938aeffc8c3784d1de8024bb605cb5aef75782be69981c74efff72c9587015d
BLAKE2b-256 checksum
How to use checksums
c2b1678dfa6d56e3f064db37df1c99a0d0630b80ea9b78d19eac07c8aedba563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.9.6 Darwin/23.6.0

Release files / nonebot_plugin_chatpdf-1.0.0-py3-none-any.whl

Download URL nonebot_plugin_chatpdf-1.0.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b842cbe2630085134dc85531edcea86ce9844a0b0522d0fdc5a99bbf1c29ff64
BLAKE2b-256 checksum
How to use checksums
7c980ac28ba66ce13edfdd8a72e75e5941f4c109935840871451c36e0cf50238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.9.6 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page