AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Extend RestApiUtility to Support Leaderboard Base URL
hunteraraujo7901c750b6f0
diff --git a/frontend/lib/utils/rest_api_utility.dart b/frontend/lib/utils/rest_api_utility.dartindex 26a2bf04a7..881321b844 100644--- a/frontend/lib/utils/rest_api_utility.dart+++ b/frontend/lib/utils/rest_api_utility.dart@@ -6,6 +6,7 @@ import 'package:http/http.dart' as http;class RestApiUtility {String _agentBaseUrl;final String _benchmarkBaseUrl = "http://127.0.0.1:8080/ap/v1";+ final String _leaderboardBaseUrl = "https://leaderboard.vercel.app/";RestApiUtility(this._agentBaseUrl);@@ -14,7 +15,16 @@ class RestApiUtility {}String _getEffectiveBaseUrl(ApiType apiType) {- return apiType == ApiType.agent ? _agentBaseUrl : _benchmarkBaseUrl;+ switch (apiType) {+ case ApiType.agent:+ return _agentBaseUrl;+ case ApiType.benchmark:+ return _benchmarkBaseUrl;+ case ApiType.leaderboard:+ return _leaderboardBaseUrl;+ default:+ return _agentBaseUrl;+ }}Future<Map<String, dynamic>> get(String endpoint,