mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2024-11-26 14:55:03 +08:00
✨新增允许添加更多支持图片模型的配置项
This commit is contained in:
parent
b3f95c2d1e
commit
ce6f51f9c9
@ -144,6 +144,7 @@ _✨ 使用 OpenAI 标准格式 API 的聊天机器人插件 ✨_
|
||||
| MARSHOAI_TEMPERATURE | 否 | 无 | 进行推理时的温度参数 |
|
||||
| MARSHOAI_TOP_P | 否 | 无 | 进行推理时的核采样参数 |
|
||||
| MARSHOAI_MAX_TOKENS | 否 | 无 | 返回消息的最大 token 数 |
|
||||
| MARSHOAI_ADDITIONAL_IMAGE_MODELS | 否 | `[]` | 额外添加的支持图片的模型列表,例如`hunyuan-vision` |
|
||||
|
||||
## ❤ 鸣谢&版权说明
|
||||
|
||||
|
@ -169,7 +169,7 @@ async def marsho(target: MsgTarget, event: Event, text: Optional[UniMsg] = None)
|
||||
"*你未设置自己的昵称。推荐使用'nickname [昵称]'命令设置昵称来获得个性化(可能)回答。"
|
||||
).send()
|
||||
|
||||
is_support_image_model = model_name.lower() in SUPPORT_IMAGE_MODELS
|
||||
is_support_image_model = model_name.lower() in SUPPORT_IMAGE_MODELS + config.marshoai_additional_image_models
|
||||
is_reasoning_model = model_name.lower() in REASONING_MODELS
|
||||
usermsg = [] if is_support_image_model else ""
|
||||
for i in text:
|
||||
|
@ -28,6 +28,7 @@ class ConfigModel(BaseModel):
|
||||
marshoai_temperature: float | None = None
|
||||
marshoai_max_tokens: int | None = None
|
||||
marshoai_top_p: float | None = None
|
||||
marshoai_additional_image_models: list = []
|
||||
|
||||
|
||||
config: ConfigModel = get_plugin_config(ConfigModel)
|
||||
|
@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "nonebot-plugin-marshoai"
|
||||
dynamic = ["version"]
|
||||
description = "Nonebot2插件,调用Azure OpenAI服务实现猫娘聊天"
|
||||
description = "Nonebot2插件,调用Azure OpenAI等AI服务实现猫娘聊天"
|
||||
readme = "README.md"
|
||||
requires-python = "<4.0,>=3.9"
|
||||
authors = [{ name = "Asankilp", email = "asankilp@outlook.com" }]
|
||||
|
Loading…
Reference in New Issue
Block a user