Skip to main content

NoneBot DeepSeek 插件。接入 DeepSeek 模型,提供智能对话与问答功能

Project description

NoneBot-Plugin-DeepSeek

✨ NoneBot DeepSeek 插件 ✨

pypi python pdm-managed alc-resolved
NoneBot Registry Supported Adapters
📸 演示与预览   |   📦️ 下载插件   |   💬 加入交流群

📖 介绍

NoneBot DeepSeek 插件。接入 DeepSeek 模型,提供智能对话与问答功能

💿 安装

以下提到的方法任选 其一 即可

[!TIP] 想要启用 Markdown 转图片功能,需安装 nonebot-plugin-deepseek[image]

[推荐] 使用 nb-cli 安装 在 Bot 的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-deepseek
使用包管理器安装
pip install nonebot-plugin-deepseek
# or, use poetry
poetry add nonebot-plugin-deepseek
# or, use pdm
pdm add nonebot-plugin-deepseek

打开 NoneBot 项目根目录下的配置文件, 在 [plugin] 部分追加写入

plugins = ["nonebot_plugin_deepseek"]

⚙️ 配置

在项目的配置文件中添加下表中配置

[!note] api_key 请从 DeepSeek 开放平台 获取
enable_modelsCustomModel 结构的字典,若无接入本地模型的需要则无需修改
若要接入本地模型,请参见:👉 文档

配置项 必填 默认值
deepseek__api_key
deepseek__enable_models [{ "name": "deepseek-chat" }, { "name": "deepseek-reasoner" }]
deepseek__prompt
deepseek__md_to_pic False
deepseek__enable_send_thinking False

🎉 使用

[!note] 请检查你的 COMMAND_START 以及上述配置项。这里默认使用 /

问答

/deepseek [内容]

快捷命令:/ds [内容] 或回复文本消息

多轮对话

/deepseek --with-context [内容]

快捷指令:/ds --with-context [内容] /多轮对话

深度思考

/deepseek [内容] --use-model deepseek-reasoner

快捷指令:/深度思考 [内容]

设置

权限:设置默认模型 指令仅 SUPERUSER 可用

# 查看支持的模型列表
/deepseek model -l|--list
# 设置默认模型
/deepseek model --set-default [模型名]

快捷指令:/模型列表 /设置默认模型 [模型名]

余额

权限:SUPERUSER

/deepseek --balance

快捷指令:/ds --balance /余额

自定义快捷指令

该特性依赖于 Alconna 快捷指令。自定义指令不带 COMMAND_START,若有必要需手动填写

# 增加
/deepseek --shortcut <自定义指令> /deepseek
# 删除
/deepseek --shortcut delete <自定义指令>
# 列出
/deepseek --shortcut list

例子:

user: /deepseek --shortcut /chat /deepseek --use-model deepseek-chat
bot: deepseek::deepseek 的快捷指令: "/chat" 添加成功
user: /chat
bot: (使用模型 deepseek-chat)

📸 效果图

DeepSeek - Preview

📄 许可证

本项目使用 MIT 许可证开源

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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_deepseek-0.1.3.tar.gz (17.2 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_deepseek-0.1.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_deepseek-0.1.3.tar.gz.

File metadata

  • Download URL: nonebot_plugin_deepseek-0.1.3.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.22.3 CPython/3.12.3 Linux/6.8.0-1020-azure

File hashes

Hashes for nonebot_plugin_deepseek-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6f0f9d7f12c954e181ce56bd18ba7418056a82905a4a0491d061cc7bbbbc25ec
MD5 5f149ac0283b168076e76e96becb4cd2
BLAKE2b-256 bfb74fddcd6a82514054ad0cd2ed22c35906636f226688e9e9e71af5de9a97f3

See more details on using hashes here.

File details

Details for the file nonebot_plugin_deepseek-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_deepseek-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ddd525b15337609f021bd23ca90998fea43cb4fb13e782865fabed7911ea03ec
MD5 eeb67ce2e0c344653baef8370a0a0222
BLAKE2b-256 1146d0a9996f6cfbd2a6aa23e19ef885767b5b2ee57bc6ddcd1f2e3953400ef2

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