uploadFileReturningAMap method
Upload an file with some purpouse ex: fine-tune, search. returns a Map the model to updated file, its need to be a JsonL, a json that contains a json with prompt and conpletion map in every line {"prompt": "
Implementation
Future<Map<String, dynamic>> uploadFileReturningAMap(
{required File file, required String purpose}) async {
try {
_checkApi(values: [purpose]);
final result = await service.uploadFile(
apiKey: _apiKey, file: file, purpose: purpose);
return result.toMap();
} catch (e) {
throw _exceptionCheck(e);
}
}