Releases: utilityfueled/content-checker
Releases · utilityfueled/content-checker
OpenAI Moderation API Integration
- OpenAI opened up their Moderation API, even if not using their AI models! I've integrated it into content-checker. To use it, specify "openai" in a new config object like this...see the README for details:
const config = {
checkManualProfanityList: true,
provider: "openai",
};
filter.isProfaneAI("your string here", config).then((response) => {
if (response.profane) {
console.log("Profanity found. Types: ", response.type.join(", "));
} else {
console.log("No profanity found");
}
});
- I'll work on adding the above to the demo repos
ESM & CommonJS Compatibility
- Added tsup for bundling so content-checker now works in ESM and CommonJS
- Created a sample vanilla JS implementation in another repo: https://github.com/utilityfueled/vanilla-js-demo
- More tests, better regex for non-AI filtering
- badword.ts renamed to filter.ts
1.0.9
1.0.8
Fixes redirection bug caused by not using www before the API base URL (www.openmoderator.com is correct, openmoderator.com is not)
1.0.7
Fix versioning
1.0.6 versioning
✅ Image moderation
Adds the isImageNSFW method and documentation