tooluniverse 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tooluniverse might be problematic. Click here for more details.
- {tooluniverse-1.0.0.dist-info → tooluniverse-1.0.1.dist-info}/METADATA +11 -1
- {tooluniverse-1.0.0.dist-info → tooluniverse-1.0.1.dist-info}/RECORD +7 -11
- tooluniverse/data/packages/software_tools.json +0 -4954
- tooluniverse/remote/expert_feedback_mcp/human_expert_mcp_server.py +0 -1611
- tooluniverse/remote/expert_feedback_mcp/simple_test.py +0 -34
- tooluniverse/remote/expert_feedback_mcp/start_web_interface.py +0 -91
- /tooluniverse/data/{clait_tools.json → adverse_event_tools.json} +0 -0
- {tooluniverse-1.0.0.dist-info → tooluniverse-1.0.1.dist-info}/WHEEL +0 -0
- {tooluniverse-1.0.0.dist-info → tooluniverse-1.0.1.dist-info}/entry_points.txt +0 -0
- {tooluniverse-1.0.0.dist-info → tooluniverse-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {tooluniverse-1.0.0.dist-info → tooluniverse-1.0.1.dist-info}/top_level.txt +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Simple Test for Human Expert System
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from tooluniverse import ToolUniverse
|
|
7
|
-
|
|
8
|
-
# Initialize tool universe
|
|
9
|
-
tooluni = ToolUniverse()
|
|
10
|
-
tooluni.load_tools()
|
|
11
|
-
|
|
12
|
-
# Test queries for expert feedback tools
|
|
13
|
-
test_queries = [
|
|
14
|
-
{"name": "expert_get_expert_status", "arguments": {}},
|
|
15
|
-
{
|
|
16
|
-
"name": "expert_consult_human_expert",
|
|
17
|
-
"arguments": {
|
|
18
|
-
"question": "What is aspirin used for?",
|
|
19
|
-
"specialty": "general",
|
|
20
|
-
"priority": "normal",
|
|
21
|
-
"timeout_minutes": 1,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
print(tooluni.tool_specification("expert_consult_human_expert"))
|
|
27
|
-
|
|
28
|
-
for idx, query in enumerate(test_queries):
|
|
29
|
-
print(
|
|
30
|
-
f"\n[{idx+1}] Running tool: {query['name']} with arguments: {query['arguments']}"
|
|
31
|
-
)
|
|
32
|
-
result = tooluni.run(query)
|
|
33
|
-
print("✅ Success. Example output snippet:")
|
|
34
|
-
print(result if isinstance(result, dict) else str(result))
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Start Web Interface Only
|
|
4
|
-
|
|
5
|
-
This script starts only the web interface for expert consultations.
|
|
6
|
-
The MCP server must be running separately.
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
import subprocess
|
|
10
|
-
import sys
|
|
11
|
-
import requests
|
|
12
|
-
from pathlib import Path
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def check_mcp_server():
|
|
16
|
-
"""Check if MCP server is running"""
|
|
17
|
-
try:
|
|
18
|
-
# Try the MCP endpoint first (follows redirects)
|
|
19
|
-
response = requests.get("http://localhost:7002/mcp/", timeout=10)
|
|
20
|
-
if response.status_code in [200, 405, 406]: # 405/406 means endpoint exists
|
|
21
|
-
return True
|
|
22
|
-
|
|
23
|
-
# Fallback: try without trailing slash
|
|
24
|
-
response = requests.get("http://localhost:7002/mcp", timeout=10)
|
|
25
|
-
if response.status_code in [200, 405, 406, 307]: # 307 redirect is also OK
|
|
26
|
-
return True
|
|
27
|
-
|
|
28
|
-
# Last resort: try the tool endpoint
|
|
29
|
-
response = requests.post(
|
|
30
|
-
"http://localhost:7002/tools/get_expert_status", json={}, timeout=10
|
|
31
|
-
)
|
|
32
|
-
return response.status_code == 200
|
|
33
|
-
except Exception:
|
|
34
|
-
return False
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def main():
|
|
38
|
-
print("🌐 Starting Human Expert Web Interface")
|
|
39
|
-
print("=" * 50)
|
|
40
|
-
|
|
41
|
-
# Check if MCP server is running
|
|
42
|
-
print("🔍 Checking for MCP server...")
|
|
43
|
-
if not check_mcp_server():
|
|
44
|
-
print("❌ MCP Server not detected!")
|
|
45
|
-
print("📡 Please start MCP server first:")
|
|
46
|
-
print(" python start_mcp_server.py")
|
|
47
|
-
print(" or")
|
|
48
|
-
print(" python human_expert_mcp_server.py")
|
|
49
|
-
print()
|
|
50
|
-
choice = input("Continue anyway? (y/N): ").strip().lower()
|
|
51
|
-
if choice != "y":
|
|
52
|
-
return 1
|
|
53
|
-
else:
|
|
54
|
-
print("✅ MCP Server is running")
|
|
55
|
-
|
|
56
|
-
print("🌐 Web Interface will run on port 8080")
|
|
57
|
-
print("🖥️ Browser should open automatically")
|
|
58
|
-
print("👨⚕️ Expert dashboard will be available at http://localhost:8080")
|
|
59
|
-
print("\nPress Ctrl+C to stop")
|
|
60
|
-
print("=" * 50)
|
|
61
|
-
|
|
62
|
-
# Find the main server script
|
|
63
|
-
script_path = Path(__file__).parent / "human_expert_mcp_server.py"
|
|
64
|
-
|
|
65
|
-
if not script_path.exists():
|
|
66
|
-
print(f"❌ Server script not found: {script_path}")
|
|
67
|
-
return 1
|
|
68
|
-
|
|
69
|
-
try:
|
|
70
|
-
# Check Flask availability
|
|
71
|
-
try:
|
|
72
|
-
pass
|
|
73
|
-
|
|
74
|
-
print("✅ Flask is available")
|
|
75
|
-
except ImportError:
|
|
76
|
-
print("❌ Flask not found. Install with: pip install flask")
|
|
77
|
-
return 1
|
|
78
|
-
|
|
79
|
-
# Start web interface only
|
|
80
|
-
subprocess.run([sys.executable, str(script_path), "--web-only"])
|
|
81
|
-
return 0
|
|
82
|
-
except KeyboardInterrupt:
|
|
83
|
-
print("\n👋 Web Interface stopped")
|
|
84
|
-
return 0
|
|
85
|
-
except Exception as e:
|
|
86
|
-
print(f"❌ Error starting web interface: {str(e)}")
|
|
87
|
-
return 1
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if __name__ == "__main__":
|
|
91
|
-
sys.exit(main())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|