Spaces:
Running
Running
File size: 680 Bytes
65d450b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "get_system_hardware_specs"
description = "Detects and returns the host machine's hardware profile and memory budgets in JSON."
inputs = {}
output_type = "string"
def forward(self) -> 'str':
"""Detects and returns the host machine's hardware profile and memory budgets in JSON.
Returns:
A JSON string containing OS, CPU, RAM, GPU, VRAM, and local server status.
"""
import json
from agents.bestLocalModel import detect_system_specs
specs = detect_system_specs()
return json.dumps(specs, indent=2) |