feat: add getSystemStats method to retrieve system statistics
This commit is contained in:
@@ -160,6 +160,13 @@ class ComfyApiHttpEndpoints {
|
|||||||
return jsonDecode(response.body);
|
return jsonDecode(response.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Gets system stats, including OS, Python version, etc.
|
||||||
|
Future<Map<String, dynamic>> getSystemStats() async {
|
||||||
|
final response = await _httpClient.get(Uri.parse('$host/system_stats'));
|
||||||
|
_validateResponse(response);
|
||||||
|
return jsonDecode(response.body);
|
||||||
|
}
|
||||||
|
|
||||||
/// Gets a list of possible samplers from the object info
|
/// Gets a list of possible samplers from the object info
|
||||||
Future<List<String>> getKSamplers() async {
|
Future<List<String>> getKSamplers() async {
|
||||||
final objectInfo = await getObjectInfo();
|
final objectInfo = await getObjectInfo();
|
||||||
|
@@ -143,6 +143,10 @@ class ComfyUiApi {
|
|||||||
Future<Map<String, dynamic>> getObjectInfo() =>
|
Future<Map<String, dynamic>> getObjectInfo() =>
|
||||||
_httpEndpoints.getObjectInfo();
|
_httpEndpoints.getObjectInfo();
|
||||||
|
|
||||||
|
/// Gets system stats from the server
|
||||||
|
Future<Map<String, dynamic>> getSystemStats() =>
|
||||||
|
_httpEndpoints.getSystemStats();
|
||||||
|
|
||||||
/// Gets a list of possible samplers from the object info
|
/// Gets a list of possible samplers from the object info
|
||||||
Future<List<String>> getKSamplers() => _httpEndpoints.getKSamplers();
|
Future<List<String>> getKSamplers() => _httpEndpoints.getKSamplers();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user