2024-09-17 20:20:31 +08:00
|
|
|
|
from nonebot.plugin import PluginMetadata, inherit_supported_adapters, require
|
|
|
|
|
require("nonebot_plugin_htmlrender")
|
|
|
|
|
require("nonebot_plugin_alconna")
|
|
|
|
|
from .azure import *
|
|
|
|
|
from nonebot import get_driver
|
|
|
|
|
#from .config import ConfigModel
|
2024-10-01 20:56:37 +08:00
|
|
|
|
usage = """MarshoAI Alpha by Asankilp
|
2024-10-01 00:04:32 +08:00
|
|
|
|
用法:
|
|
|
|
|
marsho <聊天内容>
|
|
|
|
|
与 Marsho 进行对话。当模型为gpt时,可以带上图片进行对话。
|
2024-10-01 20:56:37 +08:00
|
|
|
|
changemodel <模型名>
|
2024-10-01 00:04:32 +08:00
|
|
|
|
切换 AI 模型。仅超级用户可用。
|
|
|
|
|
reset
|
|
|
|
|
重置上下文。仅超级用户可用。
|
|
|
|
|
注意事项:
|
|
|
|
|
当 Marsho 回复消息为None或以content_filter开头的错误信息时,表示该消息被内容过滤器过滤,请调整你的聊天内容确保其合规。
|
|
|
|
|
当回复以RateLimitReached开头的错误信息时,该 AI 模型的次数配额已用尽,请联系Bot管理员。
|
2024-10-01 20:56:37 +08:00
|
|
|
|
※本AI的回答"按原样"提供,不提供任何担保。AI也会犯错,请仔细甄别回答的准确性。"""
|
2024-09-17 20:20:31 +08:00
|
|
|
|
__author__ = "Asankilp"
|
|
|
|
|
__plugin_meta__ = PluginMetadata(
|
2024-09-28 12:24:20 +08:00
|
|
|
|
name="Marsho AI插件",
|
|
|
|
|
description="接入Azure服务的AI聊天插件",
|
2024-09-17 20:20:31 +08:00
|
|
|
|
usage=usage,
|
|
|
|
|
type="application",
|
2024-10-01 20:56:37 +08:00
|
|
|
|
homepage="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai",
|
2024-09-17 20:20:31 +08:00
|
|
|
|
supported_adapters=inherit_supported_adapters("nonebot_plugin_alconna"),
|
|
|
|
|
extra={"License":"MIT","Author":"Asankilp"}
|
|
|
|
|
)
|
|
|
|
|
driver = get_driver()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@driver.on_startup
|
|
|
|
|
async def _():
|
|
|
|
|
pass
|
|
|
|
|
|