mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-08-01 03:59:51 +00:00
⚛️v0.2.2,新增1个配置项
This commit is contained in:
@ -5,7 +5,7 @@ from .azure import *
|
||||
from nonebot import get_driver, logger
|
||||
from .config import ConfigModel, config
|
||||
import nonebot_plugin_localstore as store
|
||||
usage = """MarshoAI Alpha by Asankilp
|
||||
usage = """MarshoAI Beta by Asankilp
|
||||
用法:
|
||||
marsho <聊天内容> : 与 Marsho 进行对话。当模型为 GPT-4o(-mini) 等时,可以带上图片进行对话。
|
||||
reset : 重置当前会话的上下文。 ※需要加上命令前缀使用(默认为'/')。
|
||||
|
@ -123,7 +123,8 @@ async def marsho(
|
||||
messages=context.build(target.id, target.private)+[UserMessage(content=usermsg)],
|
||||
model=model_name,
|
||||
temperature=config.marshoai_temperature,
|
||||
max_tokens=config.marshoai_max_tokens
|
||||
max_tokens=config.marshoai_max_tokens,
|
||||
top_p=config.marshoai_top_p
|
||||
)
|
||||
#await UniMessage(str(response)).send()
|
||||
choice = response.choices[0]
|
||||
|
@ -13,4 +13,5 @@ class ConfigModel(BaseModel):
|
||||
marshoai_azure_endpoint: str = "https://models.inference.ai.azure.com"
|
||||
marshoai_temperature: float = None
|
||||
marshoai_max_tokens: int = None
|
||||
marshoai_top_p: float = None
|
||||
config: ConfigModel = get_plugin_config(ConfigModel)
|
||||
|
Reference in New Issue
Block a user