mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
This commit enhances the `RestApiUtility` class to support multiple base URLs by incorporating an `ApiType` enum parameter in its methods. The changes include: 1. `_agentBaseUrl`: The base URL for the agent-related API calls. 2. `_benchmarkBaseUrl`: A hard-coded base URL for benchmark-related API calls. 3. `_getEffectiveBaseUrl`: A new private method that determines the effective base URL based on the given `ApiType`. All public methods (`get`, `post`, `getBinary`) have been updated to include an optional `ApiType` parameter, which defaults to `ApiType.agent`. Based on this parameter, `_getEffectiveBaseUrl` is called to decide the base URL for the HTTP request. This change allows for flexible API calls without the need to instantiate multiple `RestApiUtility` objects for different services.