Skip to main content

A nonebot plugin for oneapi and openai

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-chatgpt-turbo

介绍

  • 本插件适配OpenAI接口兼容的大模型(OpenAI官方、DeepSeek、硅基流动)
  • 支持大模型思维链展示(需要模型支持)
  • 本插件具有上下文回复和多模态识别(识图)功能(需要模型支持)

安装

  • 手动安装

    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" # 调用的大模型名称

可选内容(填True为开启,False为关闭):

oneapi_url = ""  # 中转API地址,使用deepseek请填写"https://api.deepseek.com",使用硅基流动请填写"https://api.siliconflow.cn/v1",使用OpenAI官方服务不需要填写
enable_private_chat = True   # 私聊开关
r1_reason = True  # DeepSeek-R1模型思维链显示开关
merge_msg = 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.2.0.tar.gz (4.3 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_chatgpt_turbo-1.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_chatgpt_turbo-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3cf1fdb340f8a9b3e19d60de4465002e50167532ac8eaeba033188e65c9dd36f
MD5 56b0721e8e06c4d5b8d7392e39f7d6a1
BLAKE2b-256 65ca95910e4526238d44eefaa398c04d1097a062502042eb4bba06b5f503018c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_chatgpt_turbo-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 957cdfeba66eec6c000ea843354cbba3f6719d2246fc3967dd0a6cd9f0390945
MD5 762d30167aefae1fe4dd9435fc0180e2
BLAKE2b-256 7ff3d64d8be0b4c48e9dd96b6e92c18aec081ba62839098cb25f6199d331488c

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