mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-02-12 15:39:58 +08:00
🐛v0.1.2,依赖项修改,修复非可处理图片模型未去除marsho字符串
This commit is contained in:
parent
f3904c9dd2
commit
fc25a5c184
@ -2,6 +2,7 @@ from nonebot.plugin import PluginMetadata, inherit_supported_adapters, require
|
|||||||
require("nonebot_plugin_alconna")
|
require("nonebot_plugin_alconna")
|
||||||
from .azure import *
|
from .azure import *
|
||||||
from nonebot import get_driver
|
from nonebot import get_driver
|
||||||
|
from .config import ConfigModel
|
||||||
usage = """MarshoAI Alpha by Asankilp
|
usage = """MarshoAI Alpha by Asankilp
|
||||||
用法:
|
用法:
|
||||||
marsho <聊天内容> : 与 Marsho 进行对话。当模型为 GPT-4o(-mini) 等时,可以带上图片进行对话。
|
marsho <聊天内容> : 与 Marsho 进行对话。当模型为 GPT-4o(-mini) 等时,可以带上图片进行对话。
|
||||||
@ -22,6 +23,7 @@ __plugin_meta__ = PluginMetadata(
|
|||||||
description="接入Azure服务的AI聊天插件",
|
description="接入Azure服务的AI聊天插件",
|
||||||
usage=usage,
|
usage=usage,
|
||||||
type="application",
|
type="application",
|
||||||
|
config=ConfigModel,
|
||||||
homepage="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai",
|
homepage="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai",
|
||||||
supported_adapters=inherit_supported_adapters("nonebot_plugin_alconna"),
|
supported_adapters=inherit_supported_adapters("nonebot_plugin_alconna"),
|
||||||
extra={"License":"MIT","Author":"Asankilp"}
|
extra={"License":"MIT","Author":"Asankilp"}
|
||||||
|
@ -114,7 +114,7 @@ async def marsho(
|
|||||||
if is_support_image_model:
|
if is_support_image_model:
|
||||||
usermsg.append(TextContentItem(text=clean_text))
|
usermsg.append(TextContentItem(text=clean_text))
|
||||||
else:
|
else:
|
||||||
usermsg += str(i.data["text"])
|
usermsg += str(clean_text)
|
||||||
response = await client.complete(
|
response = await client.complete(
|
||||||
messages=context.build(target.id, target.private)+[UserMessage(content=usermsg)],
|
messages=context.build(target.id, target.private)+[UserMessage(content=usermsg)],
|
||||||
model=model_name
|
model=model_name
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "nonebot-plugin-marshoai"
|
name = "nonebot-plugin-marshoai"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
description = "Nonebot2插件,调用Azure OpenAI服务实现猫娘聊天"
|
description = "Nonebot2插件,调用Azure OpenAI服务实现猫娘聊天"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = "<4.0,>=3.9"
|
requires-python = "<4.0,>=3.9"
|
||||||
authors = [{ name = "Asankilp", email = "asankilp@outlook.com" }]
|
authors = [{ name = "Asankilp", email = "asankilp@outlook.com" }]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nonebot2[fastapi, websockets]>=2.2.0",
|
"nonebot2>=2.2.0",
|
||||||
"nonebot-plugin-alconna>=0.48.0",
|
"nonebot-plugin-alconna>=0.48.0",
|
||||||
"azure-ai-inference>=1.0.0b4",
|
"azure-ai-inference>=1.0.0b4",
|
||||||
"zhDatetime>=1.1.1",
|
"zhDatetime>=1.1.1",
|
||||||
@ -21,10 +21,6 @@ Homepage = "https://github.com/LiteyukiStudio/nonebot-plugin-marshoai"
|
|||||||
|
|
||||||
[tool.nonebot]
|
[tool.nonebot]
|
||||||
plugins = ["nonebot_plugin_marshoai"]
|
plugins = ["nonebot_plugin_marshoai"]
|
||||||
adapters = [
|
|
||||||
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
[tool.pdm]
|
[tool.pdm]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user