chore: add facades refactor: core module export refactor: inference plugin - deprecate function registering (#537) * refactor: revamp inference plugin as class - deprecate function registering * refactor: monitoring plugin - deprecate service registering (#538) refactor: revamp inference plugin as class - deprecate function registering chore: update import refactor: plugin revamp - model management chore: update build steps and remove experimental plugins refactor: remove pluggable electron chore: add sorting for conversations chore: build plugins for testing chore: consistent plugin directory name chore: docs chore: fix CI chore: update conversation prefix
26 lines
519 B
TypeScript
26 lines
519 B
TypeScript
const si = require("systeminformation");
|
|
|
|
const getResourcesInfo = async () =>
|
|
new Promise(async (resolve) => {
|
|
const cpu = await si.cpu();
|
|
const mem = await si.mem();
|
|
const gpu = await si.graphics();
|
|
const response = {
|
|
cpu,
|
|
mem,
|
|
gpu,
|
|
};
|
|
resolve(response);
|
|
});
|
|
|
|
const getCurrentLoad = async () =>
|
|
new Promise(async (resolve) => {
|
|
const currentLoad = await si.currentLoad();
|
|
resolve(currentLoad);
|
|
});
|
|
|
|
module.exports = {
|
|
getResourcesInfo,
|
|
getCurrentLoad,
|
|
};
|