🎨 重写基本完毕

This commit is contained in:
2025-02-23 14:50:35 +08:00
parent d9f22fa0f7
commit 5b315c46b1
5 changed files with 89 additions and 127 deletions

View File

@ -263,11 +263,14 @@ async def marsho(
)
logger.info(f"正在获取回答,模型:{model_name}")
# logger.info(f"上下文:{context_msg}")
response = await handler.handle_single_chat(
usermsg, model_name, tools_lists, with_context=True
)
response = await handler.handle_common_chat(usermsg, model_name, tools_lists)
# await UniMessage(str(response)).send()
if response is not None:
context_user, context_assistant = response
context.append(context_user.as_dict(), target.id, target.private)
context.append(context_assistant.to_dict(), target.id, target.private)
else:
await UniMessage("没有回答").send()
except Exception as e:
await UniMessage(str(e) + suggest_solution(str(e))).send()
traceback.print_exc()