generateLogDescriptions method

Future<void> generateLogDescriptions({
  1. required LogDescriptionPayload payload,
})

Implementation

Future<void> generateLogDescriptions({
  required LogDescriptionPayload payload,
}) async {
  try {
    emit(const LogDescriptionsLoading());

    final logDescriptions = await aiRepository.generateLogDescription(
      payload: payload,
    );
    emit(LogDescriptionsLoaded(logDescriptions: logDescriptions));
  } catch (e) {
    emit(LogDescriptionsError(message: e.toString()));
  }
}