Skip to main content

A nonebot plugin for oneapi and openai

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-chatgpt-turbo

介绍

  • 本插件适配OneAPI和OpenAI接口,可以在nonebot中调用OpenAI官方或是OneAPI(gpt系列模型,gemini-1.5-pro)接口的模型进行回复。
  • 本插件具有上下文回复和多模态识别(识图)功能。

安装

  • 手动安装

    git clone https://github.com/Alpaca4610/nonebot_plugin_chatgpt_turbo.git
    

    下载完成后在bot项目的pyproject.toml文件手动添加插件:

    plugin_dirs = ["xxxxxx","xxxxxx",......,"下载完成的插件路径/nonebot-plugin-gpt3.5-turbo"]
    
  • 使用 pip

    pip install nonebot-plugin-chatgpt-turbo
    

配置文件

在Bot根目录下的.env文件中追加如下内容:

oneapi_key = ""  # OpenAI官方或者是支持OneAPI的大模型中转服务商提供的KEY
oneapi_model = "gpt-4o" # 使用的语言大模型,使用识图功能请填写合适的大模型名称

可选内容:

oneapi_url = ""  # (可选)大模型中转服务商提供的中转地址,使用OpenAI官方服务不需要填写
enable_private_chat = True   # 私聊开关,默认开启,改为False关闭

效果

使用方法

  • @机器人发送问题时机器人不具有上下文回复的能力
  • chat 使用该命令进行问答时,机器人具有上下文回复的能力
  • clear 清除当前用户的聊天记录

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_chatgpt_turbo-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file nonebot_plugin_chatgpt_turbo-1.0.1.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_chatgpt_turbo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0b5d8144f9efc49ec7e4a5d1fb69f3e18664e59974575eae7b6b5b648275a8fa
MD5 e439accae571d05eb3920e8e53c0471f
BLAKE2b-256 8cbb987c473f911a819a0b985817a0ea1ebdf24d79c0beb89f34aa9a221a0194

See more details on using hashes here.

File details

Details for the file nonebot_plugin_chatgpt_turbo-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_chatgpt_turbo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 864dd7ee9320100015b999fd1cf99acafb9ad8f45cd3d547711d56aaed8bc47a
MD5 1b06e2f2ae2564ab6b9e81a496f84950
BLAKE2b-256 d8538871a6d8abb06f4895e961dbdb6ea59485260db9b084b89ac241fec24067

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