Machine Studying + openAI: fixing a textual content classification downside | by Ricardo Ribas

How I migrated an outdated resolution to a extra elegant, sturdy and scalable resolution utilizing textual content classification from openAI

Photograph by Hunter Harritt on Unsplash

As talked about within the earlier article, I talked about how I realized the foundations of machine studying with the intention to resolve an issue with textual content classification. As a result of lack of expertise with machine studying and AI, it was fairly vital to be pragmatic and discover a resolution that will be:

  1. Easy to make use of and preserve;
  2. Not costly;
  3. Suitable with present options;
  4. Shortly classify large quantities of textual content;
  5. Means to be consistently improved and refined;

From the performed analysis, OpenAI appeared at first look the one that will match the answer necessities.

With just some strains, you may make a request to the openAI api to get a classification response. For the sake of the demonstration, I used an instance from the examples reference.

import OpenAI from "openai";

// Initialize the openai api key
const openai = new OpenAI({
apiKey: 'OPEN-AI-API-KEY'
});

const response =…