findAssistants method

  1. @override
Future<List<Assistant>> findAssistants()
override

Implementation

@override
Future<List<Assistant>> findAssistants() async {
  var url = 'https://api.openai.com/v1/assistants';
  var response = await httpClient.get(url);
  Map<String, dynamic> map = response.data;
  var list = map.getList('data', (item) => Assistant.fromMap(item));
  return list;
}