feat:展示更详细的工具信息,修改wait定义

This commit is contained in:
SengokuCola
2026-04-09 19:58:20 +08:00
parent 4395e3aad7
commit 243b8deb43
16 changed files with 576 additions and 194 deletions

View File

@@ -0,0 +1,23 @@
from src.maisaka.chat_loop_service import MaisakaChatLoopService
def test_build_tool_names_log_text_supports_openai_function_schema() -> None:
tool_definitions = [
{
"type": "function",
"function": {
"name": "mute_user",
"description": "禁言指定用户",
"parameters": {
"type": "object",
"properties": {},
},
},
},
{
"name": "reply",
"description": "发送回复",
},
]
assert MaisakaChatLoopService._build_tool_names_log_text(tool_definitions) == "mute_user、reply"