mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2024-11-26 23:05:04 +08:00
⚡ 精简代码
This commit is contained in:
parent
16f3852cc6
commit
8df614163a
@ -187,11 +187,10 @@ async def marsho(target: MsgTarget, event: Event, text: Optional[UniMsg] = None)
|
||||
channel_id = "group_" + target.id
|
||||
context_msg = list(await load_context_from_json(f"back_up_context_{channel_id}", "contexts/backup"))
|
||||
loaded_target_list.append(target.id)
|
||||
context_msg = [get_prompt()] + context_msg
|
||||
target_list.append([target.id, target.private])
|
||||
if is_reasoning_model:
|
||||
context_msg = context_msg[1:]
|
||||
# o1等推理模型不支持系统提示词,故截断
|
||||
if not is_reasoning_model:
|
||||
context_msg = [get_prompt()] + context_msg
|
||||
# o1等推理模型不支持系统提示词
|
||||
response = await make_chat(
|
||||
client=client,
|
||||
model_name=model_name,
|
||||
|
Loading…
Reference in New Issue
Block a user