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.1.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_chatpdf-0.1.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

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