janhq / cortex.cpp

Local AI API Platform
https://cortex.so
Apache License 2.0
2.06k stars 116 forks source link

Implement hardware detection function #1591

Open vansangpfiev opened 1 week ago

vansangpfiev commented 1 week ago

Hardware service needs to provide below information:

{
  "cpu": {
    "arch": "string",
    "cores": "string",
    "model": "string",
    "instructions": ["string"]
  },
  "os": {
    "version": "string",
    "name": "string"
  },
  "ram": {
    "total": "string",
    "available": "string",
    "type": "string"
  },
  "storage": {
    "total": number,
    "available": number,
    "type": "string"
  },
  "gpus": [
    {
      "model": "string",
      "vram": "string",
      "driver_version": "string"
    }
  ],
  "power": {
    "battery_life": number,
    "charging_status": "string",
    "is_power_saving": boolean
  },
  "monitors": [
    {
      "resolution": "string",
      "refresh_rate": number,
      "resolution":"string
    }
  ]
}
vansangpfiev commented 1 day ago

Obtaining GPU information for AMD graphics cards can be complex: