Skip to main content

A nonebot2 plugin package for openai api chatBot

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot_plugin_oachat

✨ NoneBot openai api ——简单的调用接口 ✨

pypi

安装

  • pip
pip install nonebot-plugin-oachat
  • nb_cli
nb plugin install nonebot-plugin-oachat

配置.env

# ====== WULUN_OACHATBOT ======   # 没有上下文的OPENAI
oachat_on_command = /chat

OPENAI_API_KEY = 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
OPENAI_API_MODELID = "text-davinci-003"
OPENAI_MAX_TOKENS = 1000

使用

nonebot.load_plugin('nonebot_plugin_oachat')

命令

注:使用命令时需要加命令前缀

  • 使用 /chat + 对话即可
    

其他

有bug有什么想法都可以告诉我,可先用e-mail联系:wulun0102@outlook.com

更新记录

  • 2023.0303 更新OpenAI回复逻辑的补全问题,详情参照issue-01

  • 本项目只是为了一个简单可分离的接口,以便接入后续的新api

🐦 TODO list

  • 加入上下文对话;
  • 适配ChatGPT API;
  • 搞到本地模型;
  • 增解除文本输出限制;

特别鸣谢:

  • None

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_oachat-0.1.8.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_oachat-0.1.8-py3-none-any.whl (5.9 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