2024-09-17 20:20:31 +08:00
|
|
|
from nonebot.plugin import PluginMetadata, inherit_supported_adapters, require
|
|
|
|
require("nonebot_plugin_alconna")
|
2024-10-03 11:58:33 +08:00
|
|
|
require("nonebot_plugin_localstore")
|
2024-09-17 20:20:31 +08:00
|
|
|
from .azure import *
|
2024-10-03 11:58:33 +08:00
|
|
|
from nonebot import get_driver, logger
|
|
|
|
from .config import ConfigModel, config
|
2024-10-23 01:40:09 +08:00
|
|
|
from .constants import USAGE
|
2024-10-03 11:58:33 +08:00
|
|
|
import nonebot_plugin_localstore as store
|
2024-10-21 00:57:57 +08:00
|
|
|
|
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-10-23 01:40:09 +08:00
|
|
|
usage=USAGE,
|
2024-09-17 20:20:31 +08:00
|
|
|
type="application",
|
2024-10-02 10:49:58 +08:00
|
|
|
config=ConfigModel,
|
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 _():
|
2024-10-03 11:58:33 +08:00
|
|
|
logger.info("MarshoAI 已经加载~🐾")
|
|
|
|
logger.info(f"Marsho 的插件数据存储于 : {str(store.get_plugin_data_dir())} 哦~🐾")
|
|
|
|
if config.marshoai_token == "":
|
|
|
|
logger.warning("token 未配置。可能无法进行聊天。")
|
|
|
|
else:
|
|
|
|
logger.info("token 已配置~!🐾")
|
2024-10-23 01:40:09 +08:00
|
|
|
logger.info("マルショは、高性能ですから!")
|