How I migrated an outdated answer to a extra elegant, sturdy and scalable answer utilizing textual content classification from openAI
As talked about within the previous article, I talked about how I realized the foundations of machine studying with a purpose to resolve an issue with textual content classification. Because of the lack of expertise with machine studying and AI, it was fairly essential to be pragmatic and discover a answer that will be:
- Easy to make use of and keep;
- Not costly;
- Suitable with present options;
- Rapidly classify huge quantities of textual content;
- Potential to be consistently improved and refined;
From the carried out 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 =…