Spaces:
Running
Running
| # def get_questions(self) -> list[GaiaQuestion]: | |
| # """Retrieve all evaluation questions.""" | |
| # response = self._request( | |
| # method="GET", | |
| # path="/questions", | |
| # ) | |
| # data = response.json() | |
| # if not isinstance(data, list): | |
| # raise RuntimeError( | |
| # "The /questions endpoint did not return a list." | |
| # ) | |
| # return [ | |
| # GaiaQuestion.from_api(item) | |
| # for item in data | |
| # ] | |
| # def get_random_question(self) -> GaiaQuestion: | |
| # """Retrieve one random evaluation question.""" | |
| # response = self._request( | |
| # method="GET", | |
| # path="/random-question", | |
| # ) | |
| # data = response.json() | |
| # if not isinstance(data, dict): | |
| # raise RuntimeError( | |
| # "The /random-question endpoint returned " | |
| # "an unexpected response." | |
| # ) | |
| # return GaiaQuestion.from_api(data) |