How I migrated an outdated resolution to a extra elegant, strong and scalable resolution utilizing textual content classification from openAI
As talked about within the earlier article, I talked about how I discovered the foundations of machine studying to be able to remedy 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 might be:
- Easy to make use of and keep;
- Not costly;
- Appropriate with current options;
- Rapidly classify huge quantities of textual content;
- Potential to be always improved and refined;
From the carried out analysis, OpenAI appeared at first look the one that might match the answer necessities.
With only a few traces, 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 =…