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

This commit is contained in:
Asankilp 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

View File

@ -1,12 +1,12 @@
[project]
name = "nonebot-plugin-marshoai"
version = "0.1.1"
version = "0.1.2"
description = "Nonebot2插件调用Azure OpenAI服务实现猫娘聊天"
readme = "README.md"
requires-python = "<4.0,>=3.9"
authors = [{ name = "Asankilp", email = "asankilp@outlook.com" }]
dependencies = [
"nonebot2[fastapi, websockets]>=2.2.0",
"nonebot2>=2.2.0",
"nonebot-plugin-alconna>=0.48.0",
"azure-ai-inference>=1.0.0b4",
"zhDatetime>=1.1.1",
@ -21,10 +21,6 @@ Homepage = "https://github.com/LiteyukiStudio/nonebot-plugin-marshoai"
[tool.nonebot]
plugins = ["nonebot_plugin_marshoai"]
adapters = [
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
]
[tool.pdm]