Skip to main content

A nonebot plugin for chatpdf

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-chatpdf

介绍

安装

  • 手动安装

    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的网络问题

使用方法

  • /start (使用该命令启动chatpdf文章分析功能)
  • /add (启动之后,在该命令后面添加文章的内容,由于QQ的发送字数限制,可能需要将文章分成若干个可以发送的片段,然后依次使用该命令发送)
  • /stop (文章添加完成之后,使用该命令告知机器人,机器人开始分析文章并使用OpenAI的API生成embedding文件)
  • /chat_pdf (文章分析完成后,使用该命令后面接需要提问的关于文章的问题,机器人会给出答案)
  • /delete_all (删除所有缓存文件)

注意事项

  • 分析过程中会在机器人的data文件夹下产生embedding缓存文件,注意缓存占用
  • 每次调用/start命令时,都会清除调用者以前的embedding缓存文件
  • 插件加载时会删除所有用户的embedding缓存文件

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_chatpdf-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_chatpdf-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_chatpdf-0.1.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_chatpdf-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.6 Darwin/22.3.0

File hashes

Hashes for nonebot_plugin_chatpdf-0.1.2.tar.gz
Algorithm Hash digest
SHA256 663aad515756ba98a23f9fd03c02083f3055540f274ee09d2040aeb40943f7bc
MD5 e5c10113a6e1a2d32d9583979c8ebdf2
BLAKE2b-256 62fe4e8e27f5b74fe36794ada0646d5127c4867add0c18ae7bcefdf0ba8671ea

See more details on using hashes here.

File details

Details for the file nonebot_plugin_chatpdf-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_chatpdf-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45fb032ea3bb21c9e8855f5d1b5744a5eda3d3faf2e191c7edd3147f89199d02
MD5 66ef1fb9f0bc9e169aa87ac794417221
BLAKE2b-256 416af3671f0ade71268e790daadb75650f97d8654d1a21424ec42cef675392ed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page