toOpenAIJson method
Convert to OpenAI format for backward compatibility
Implementation
Map<String, dynamic> toOpenAIJson() {
return {
'id': id,
'bytes': sizeBytes,
'created_at': createdAt.millisecondsSinceEpoch ~/ 1000,
'filename': filename,
'object': object,
if (purpose != null) 'purpose': purpose!.value,
if (status != null) 'status': status!.value,
if (statusDetails != null) 'status_details': statusDetails,
};
}