Giter Site home page Giter Site logo

nonebot_plugin_chatpdf's Introduction

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-chatpdf

介绍

  • 本插件灵感来源于最近很火的 chatpdf
  • 将需要分析的论文/阅读材料上传到群文件,机器人可以对其进行存储分析,然后你可以向其提问有关文章内容、文章概要、对于文章的思考等问题
  • 本插件参考和使用了项目 Document_QA 中的核心代码
  • 注意,目前OpenAI限制了免费的API请求速率,在速率限制的情况下本插件可能无法使用。

效果

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

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命令时,都会清除调用者以前的分析缓存

nonebot_plugin_chatpdf's People

Contributors

alpaca4610 avatar

Stargazers

HeisenBerg? avatar  avatar sineom avatar TheIronME avatar licycle avatar  avatar  avatar 毎日Flakoちゃん avatar  avatar  avatar moweifeng avatar Bai Long avatar richard223 avatar didier avatar  avatar 梁达标 avatar  avatar  avatar Karmo avatar  avatar lushaorong avatar Karry avatar Angry.fish avatar 正经人王同学 avatar  avatar  avatar ZhouZhengyi avatar  avatar  avatar Mark L avatar  avatar imClumsyPanda avatar  avatar  avatar Milukun avatar DaFenga avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar zccl avatar Nanako avatar  avatar mactone avatar PEIN avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nonebot_plugin_chatpdf's Issues

大佬,问两句就达到tokens上限了,怎么办

This model's maximum context length is 4097 tokens. However, your messages resulted in 4279 tokens. Please reduce the length of the messages.
另外,nonebot的指令本就需要打/,加上预设指令就变成了两个//,实际需要输入//start,README.md容易产生误导
以及能否支持上传pdf功能

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.