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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_oachat-0.1.8-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_oachat-0.1.8.tar.gz.

File metadata

  • Download URL: nonebot_plugin_oachat-0.1.8.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for nonebot_plugin_oachat-0.1.8.tar.gz
Algorithm Hash digest
SHA256 4248b52e3b2d2d3ee46914795bc5c3109efda08c430931c6273d77d534605fa7
MD5 8548267dae877df1b778e8ef99c299ed
BLAKE2b-256 1f6bb4d2da97781789248eb87e828b37fe8f9ddcac1829cfa0d542e1ce4c6cb0

See more details on using hashes here.

File details

Details for the file nonebot_plugin_oachat-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_oachat-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8db2f4c4644dafe80564a3d68757607d9a450804a26d1b160ce112cd93391274
MD5 4d10b0d7bf6a4d978c5ea49c6386f473
BLAKE2b-256 1d30bff4744abd4e18387dcee208fb25d17fe96d99fec12f020714d7972766a4

See more details on using hashes here.

Supported by

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