revert (#20)
Browse files- Revert (3cc6f77a4c71cd0f8b55e8047e90b0a9a0d4443a)
- ComputeAgent/graph/graph.py +11 -2
- ComputeAgent/graph/graph_deploy.py +11 -2
- Compute_MCP/tools.py +1 -1
ComputeAgent/graph/graph.py
CHANGED
|
@@ -55,8 +55,17 @@ python_executable = sys.executable
|
|
| 55 |
mcp_client = MultiServerMCPClient(
|
| 56 |
{
|
| 57 |
"hivecompute": {
|
| 58 |
-
"
|
| 59 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
}
|
| 62 |
)
|
|
|
|
| 55 |
mcp_client = MultiServerMCPClient(
|
| 56 |
{
|
| 57 |
"hivecompute": {
|
| 58 |
+
"command": python_executable,
|
| 59 |
+
"args": [mcp_server_path],
|
| 60 |
+
"transport": "stdio",
|
| 61 |
+
"env": {
|
| 62 |
+
# Pass HF Spaces secrets to the MCP subprocess
|
| 63 |
+
"HIVE_COMPUTE_DEFAULT_API_TOKEN": os.getenv("HIVE_COMPUTE_DEFAULT_API_TOKEN", ""),
|
| 64 |
+
"HIVE_COMPUTE_BASE_API_URL": os.getenv("HIVE_COMPUTE_BASE_API_URL", "https://api.hivecompute.ai"),
|
| 65 |
+
# Also pass these to ensure Python works correctly
|
| 66 |
+
"PATH": os.getenv("PATH", ""),
|
| 67 |
+
"PYTHONPATH": os.getenv("PYTHONPATH", ""),
|
| 68 |
+
}
|
| 69 |
}
|
| 70 |
}
|
| 71 |
)
|
ComputeAgent/graph/graph_deploy.py
CHANGED
|
@@ -47,8 +47,17 @@ python_executable = sys.executable
|
|
| 47 |
mcp_client = MultiServerMCPClient(
|
| 48 |
{
|
| 49 |
"hivecompute": {
|
| 50 |
-
"
|
| 51 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
}
|
| 54 |
)
|
|
|
|
| 47 |
mcp_client = MultiServerMCPClient(
|
| 48 |
{
|
| 49 |
"hivecompute": {
|
| 50 |
+
"command": python_executable,
|
| 51 |
+
"args": [mcp_server_path],
|
| 52 |
+
"transport": "stdio",
|
| 53 |
+
"env": {
|
| 54 |
+
# Pass HF Spaces secrets to the MCP subprocess
|
| 55 |
+
"HIVE_COMPUTE_DEFAULT_API_TOKEN": os.getenv("HIVE_COMPUTE_DEFAULT_API_TOKEN", ""),
|
| 56 |
+
"HIVE_COMPUTE_BASE_API_URL": os.getenv("HIVE_COMPUTE_BASE_API_URL", "https://api.hivecompute.ai"),
|
| 57 |
+
# Also pass these to ensure Python works correctly
|
| 58 |
+
"PATH": os.getenv("PATH", ""),
|
| 59 |
+
"PYTHONPATH": os.getenv("PYTHONPATH", ""),
|
| 60 |
+
}
|
| 61 |
}
|
| 62 |
}
|
| 63 |
)
|
Compute_MCP/tools.py
CHANGED
|
@@ -9,7 +9,7 @@ mcp = FastMCP(
|
|
| 9 |
)
|
| 10 |
|
| 11 |
@mcp.tool()
|
| 12 |
-
async def create_compute_instance(name: str = "default", location: str = "uae", config: str = "
|
| 13 |
"""
|
| 14 |
Create a new compute instance with the specified configuration.
|
| 15 |
|
|
|
|
| 9 |
)
|
| 10 |
|
| 11 |
@mcp.tool()
|
| 12 |
+
async def create_compute_instance(name: str = "default", location: str = "uae", config: str = "2x RTX 4090") -> Dict[str, Any]:
|
| 13 |
"""
|
| 14 |
Create a new compute instance with the specified configuration.
|
| 15 |
|