insertOne method triggers MindsDB to generate an AI collection called text_summarization that uses the OpenAI integration to predict a field named highlights. The model is created inside the default mindsdb project. In MindsDB, projects are a natural way to keep artifacts, such as models or views, separate according to what predictive task they solve. You can learn more about MindsDB projects here.
The training_options key specifies the parameters that this handler requires.
engine parameter defines that we use the openai engine.prompt_template parameter conveys the structure of a message that is to be completed with additional text generated by the model.insertOne method has started execution, we can check the status of the creation process with the following query:
articles collection is used to make batch predictions. Upon joining the text_summarization model with the articles collection, the model uses all values from the article field.