feat: show active local model in Flutter UI
This commit is contained in:
@@ -22,6 +22,13 @@ class ApiRepository {
|
||||
void setBaseUrl(String value) =>
|
||||
_baseUrl = value.replaceFirst(RegExp(r'/+$'), '');
|
||||
|
||||
Future<String> getModelName() async {
|
||||
final response = await http.get(Uri.parse('$_baseUrl/health'));
|
||||
_checkStatus(response);
|
||||
final data = jsonDecode(response.body) as Map<String, dynamic>;
|
||||
return data['model'] as String? ?? 'نموذج غير معروف';
|
||||
}
|
||||
|
||||
Future<String> _userId() async {
|
||||
final cached = _cachedUserId;
|
||||
if (cached != null) return cached;
|
||||
|
||||
Reference in New Issue
Block a user