Training Data Importer - Confusion while following tutorial

I have my training data stored in excel sheet and i am trying to import excel sheet into rasa using Training Data Importer. I am trying to fetch nlu data using excel sheet,there are two ways mentioned with two different file imports: First way:

async def get_nlu_data(self, language: Optional[Text] = "en") -> TrainingData:
        from rasa.nlu.training_data import loading
        path_to_nlu_file = self._custom_get_nlu_file()
        return loading.load_data(path_to_nlu_file)

Second way:

async def get_nlu_data(self, language: Optional[Text] = "en") -> TrainingData:
   from rasa.importers import utils

   return utils.training_data_from_paths(self.nlu_files, language)

Which one to follow?

1 Like