fix:1.修复mcp提示词没有加载用户提示词模板问题

This commit is contained in:
xiamuceer
2025-11-30 11:46:26 +08:00
parent 117aedbc31
commit 19e08d99b3
3 changed files with 70 additions and 59 deletions
+6 -2
View File
@@ -168,8 +168,12 @@ class MCPTestService:
logger.info(f"📋 转换后的OpenAI工具数量: {len(openai_tools)}")
logger.debug(f"📋 OpenAI工具列表: {[t['function']['name'] for t in openai_tools]}")
# 调用AI选择工具
prompts = prompt_service.get_mcp_tool_test_prompts(plugin.plugin_name)
# 调用AI选择工具(使用自定义模板系统)
prompts = await prompt_service.get_mcp_tool_test_prompts(
plugin_name=plugin.plugin_name,
user_id=user.user_id,
db=db_session
)
ai_response = await ai_service.generate_text(
prompt=prompts["user"],