forked from ci4s/ai4mats-mcp-tools
44 lines
1015 B
Python
44 lines
1015 B
Python
# test_bayesian.py
|
|
import asyncio
|
|
import sys
|
|
import os
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
from tools.bayesian_mcp_server import predict_next_five_rounds
|
|
|
|
|
|
async def main():
|
|
print("🚀 开始测试 贝叶斯分析 MCP 服务...")
|
|
|
|
# 测试参数(使用您之前提供的示例数据)
|
|
try:
|
|
result = await predict_next_five_rounds(
|
|
Concentration=6,
|
|
T_S=210,
|
|
T_Mo=860,
|
|
growth_time=35,
|
|
Ar=520,
|
|
CO2=80,
|
|
H2=10,
|
|
Density=0.32,
|
|
Width=0.48,
|
|
R_stacking_ratio=0.77,
|
|
rounds=5,
|
|
suggestions_per_round=1
|
|
)
|
|
|
|
print("\n✅ 贝叶斯分析 MCP 服务调用成功!")
|
|
print("=" * 60)
|
|
print("返回结果:")
|
|
print(result)
|
|
print("=" * 60)
|
|
|
|
except Exception as e:
|
|
print(f"\n❌ 贝叶斯分析 MCP 服务调用失败: {e}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main()) |