Compare commits

...

3 Commits
v1.2 ... main

Author SHA1 Message Date
04e380f673 🗑️ 移除QQ群链接 2025-12-05 16:30:48 +08:00
8cec236c33 提高alconna版本要求,milky表情回应 2025-11-02 16:44:52 +08:00
4a08a2d415 仅对onebot适配器启用表情回应 2025-11-02 16:32:51 +08:00
3 changed files with 10 additions and 4 deletions

View File

@@ -10,7 +10,6 @@
_✨ 使用 OpenAI 标准格式 API 的聊天机器人插件 ✨_ _✨ 使用 OpenAI 标准格式 API 的聊天机器人插件 ✨_
[![QQ群](https://img.shields.io/badge/QQ群-1029557452-blue.svg?logo=QQ&style=flat-square)](https://qm.qq.com/q/a13iwP5kAw)
[![NoneBot Registry](https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin%2Fnonebot-plugin-marshoai&style=flat-square)](https://registry.nonebot.dev/plugin/nonebot-plugin-marshoai:nonebot_plugin_marshoai) [![NoneBot Registry](https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin%2Fnonebot-plugin-marshoai&style=flat-square)](https://registry.nonebot.dev/plugin/nonebot-plugin-marshoai:nonebot_plugin_marshoai)
<a href="https://registry.nonebot.dev/plugin/nonebot-plugin-marshoai:nonebot_plugin_marshoai"> <a href="https://registry.nonebot.dev/plugin/nonebot-plugin-marshoai:nonebot_plugin_marshoai">
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin-adapters%2Fnonebot-plugin-marshoai&style=flat-square" alt="Supported Adapters"> <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin-adapters%2Fnonebot-plugin-marshoai&style=flat-square" alt="Supported Adapters">

View File

@@ -229,6 +229,9 @@ async def marsho(
): ):
global target_list global target_list
is_reaction_supported = False
if "onebot" or "milky" in bot.adapter.get_name().lower():
is_reaction_supported = True
if event.get_message().extract_plain_text() and ( if event.get_message().extract_plain_text() and (
not text not text
and event.get_message().extract_plain_text() != config.marshoai_default_name and event.get_message().extract_plain_text() != config.marshoai_default_name
@@ -237,7 +240,8 @@ async def marsho(
if not text: if not text:
# 发送说明 # 发送说明
# await UniMessage(metadata.usage + "\n当前使用的模型" + model_name).send() # await UniMessage(metadata.usage + "\n当前使用的模型" + model_name).send()
await message_reaction(Emoji("38")) if is_reaction_supported:
await message_reaction(Emoji("38"))
await marsho_cmd.finish(INTRODUCTION) await marsho_cmd.finish(INTRODUCTION)
backup_context = await get_backup_context(target.id, target.private) backup_context = await get_backup_context(target.id, target.private)
if backup_context: if backup_context:
@@ -270,7 +274,8 @@ async def marsho(
+ await get_mcp_list() + await get_mcp_list()
) )
logger.info(f"正在获取回答,模型:{model_name}") logger.info(f"正在获取回答,模型:{model_name}")
await message_reaction(Emoji("66")) if is_reaction_supported:
await message_reaction(Emoji("66"))
# logger.info(f"上下文:{context_msg}") # logger.info(f"上下文:{context_msg}")
response = await handler.handle_common_chat( response = await handler.handle_common_chat(
usermsg, model_name, tools_lists, config.marshoai_stream usermsg, model_name, tools_lists, config.marshoai_stream

View File

@@ -10,7 +10,7 @@ authors = [
] ]
dependencies = [ dependencies = [
"nonebot2>=2.4.0", "nonebot2>=2.4.0",
"nonebot-plugin-alconna>=0.57.1", "nonebot-plugin-alconna>=0.60.3",
"nonebot-plugin-localstore>=0.7.1", "nonebot-plugin-localstore>=0.7.1",
"zhDatetime>=2.0.0", "zhDatetime>=2.0.0",
"aiohttp>=3.9", "aiohttp>=3.9",
@@ -44,6 +44,8 @@ plugins = ["nonebot_plugin_marshoai"]
# 测试用 # 测试用
adapters = [ adapters = [
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" }, { name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
{ name = "nonebot-adapter-milky", module_name = "nonebot.adapters.milky" },
] ]
[tool.pdm] [tool.pdm]