Implement forced tool selection in AIClient and OpenAIModel, enhancing tool invocation capabilities. Added methods for extracting forced tool names from user messages and updated logging to reflect forced tool usage. Improved error handling for timeout scenarios in message handling and model interactions, ensuring better user feedback and robustness.

This commit is contained in:
Mimikko-zeus
2026-03-03 14:25:21 +08:00
parent 7d7a4b8f54
commit 4a2666b1f2
5 changed files with 114 additions and 20 deletions

View File

@@ -102,7 +102,7 @@ class MessageHandler:
f"{command_name} add <model_name> (保持 provider/api_base/api_key 不变)\n"
f"{command_name} add <key> <provider> <model_name> [api_base]\n"
f"{command_name} add <key> <json>\n"
" json 字段provider, model_name, api_base, api_key, temperature, max_tokens, top_p\n"
" json 字段provider, model_name, api_base, api_key, temperature, max_tokens, top_p, timeout\n"
f"{command_name} switch <key|index>\n"
f"{command_name} remove <key|index>"
)