mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2026-01-19 09:01:48 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04e380f673 | |||
| 8cec236c33 | |||
| 4a08a2d415 |
@@ -10,7 +10,6 @@
|
||||
|
||||
_✨ 使用 OpenAI 标准格式 API 的聊天机器人插件 ✨_
|
||||
|
||||
[](https://qm.qq.com/q/a13iwP5kAw)
|
||||
[](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">
|
||||
|
||||
@@ -229,6 +229,9 @@ async def marsho(
|
||||
):
|
||||
|
||||
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 (
|
||||
not text
|
||||
and event.get_message().extract_plain_text() != config.marshoai_default_name
|
||||
@@ -237,7 +240,8 @@ async def marsho(
|
||||
if not text:
|
||||
# 发送说明
|
||||
# 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)
|
||||
backup_context = await get_backup_context(target.id, target.private)
|
||||
if backup_context:
|
||||
@@ -270,7 +274,8 @@ async def marsho(
|
||||
+ await get_mcp_list()
|
||||
)
|
||||
logger.info(f"正在获取回答,模型:{model_name}")
|
||||
await message_reaction(Emoji("66"))
|
||||
if is_reaction_supported:
|
||||
await message_reaction(Emoji("66"))
|
||||
# logger.info(f"上下文:{context_msg}")
|
||||
response = await handler.handle_common_chat(
|
||||
usermsg, model_name, tools_lists, config.marshoai_stream
|
||||
|
||||
@@ -10,7 +10,7 @@ authors = [
|
||||
]
|
||||
dependencies = [
|
||||
"nonebot2>=2.4.0",
|
||||
"nonebot-plugin-alconna>=0.57.1",
|
||||
"nonebot-plugin-alconna>=0.60.3",
|
||||
"nonebot-plugin-localstore>=0.7.1",
|
||||
"zhDatetime>=2.0.0",
|
||||
"aiohttp>=3.9",
|
||||
@@ -44,6 +44,8 @@ plugins = ["nonebot_plugin_marshoai"]
|
||||
# 测试用
|
||||
adapters = [
|
||||
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
|
||||
{ name = "nonebot-adapter-milky", module_name = "nonebot.adapters.milky" },
|
||||
|
||||
]
|
||||
|
||||
[tool.pdm]
|
||||
|
||||
Reference in New Issue
Block a user