Updating the message model

Next, we are going to update our message model. We are going to save categories, documentSentiment, entities, sentences, tokens, and language. Update server\models\message.ts as shown in the following code:

// SNIPP SNIPPnlpCategories: [{    type: Schema.Types.Mixed,    default: []}],nlpDocumentSentiment: {    type: Schema.Types.Mixed},nlpEntities: [{    type: Schema.Types.Mixed,    default: []}],nlpSentences: [{    type: Schema.Types.Mixed,    default: []}],nlpTokens: [{    type: Schema.Types.Mixed,    default: []}],nlpLanguage: String// SNIPP SNIPP

Get Google Cloud AI Services Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.