🐛v0.1.2,依赖项修改,修复非可处理图片模型未去除marsho字符串

This commit is contained in:
2024-10-02 10:49:58 +08:00
parent f3904c9dd2
commit fc25a5c184
3 changed files with 5 additions and 7 deletions

View File

@ -2,6 +2,7 @@ from nonebot.plugin import PluginMetadata, inherit_supported_adapters, require
require("nonebot_plugin_alconna")
from .azure import *
from nonebot import get_driver
from .config import ConfigModel
usage = """MarshoAI Alpha by Asankilp
用法:
marsho <聊天内容> : 与 Marsho 进行对话。当模型为 GPT-4o(-mini) 等时,可以带上图片进行对话。
@ -22,6 +23,7 @@ __plugin_meta__ = PluginMetadata(
description="接入Azure服务的AI聊天插件",
usage=usage,
type="application",
config=ConfigModel,
homepage="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai",
supported_adapters=inherit_supported_adapters("nonebot_plugin_alconna"),
extra={"License":"MIT","Author":"Asankilp"}

View File

@ -114,7 +114,7 @@ async def marsho(
if is_support_image_model:
usermsg.append(TextContentItem(text=clean_text))
else:
usermsg += str(i.data["text"])
usermsg += str(clean_text)
response = await client.complete(
messages=context.build(target.id, target.private)+[UserMessage(content=usermsg)],
model=model_name