ChatGPT text pre-analysis example

Ben - Oct 25 - - Dev Community

Introduction

To illustrate a useful example of Safe-Text, let's imagine you are building the next AI product. You are not an end user of the new impressive ChatGPT, but you are directing user questions somehow to ChatGPT. To value your work, you are providing your users with the possibility of sharing their Q/As so at some point of requests, you are caching their questions. KaBoom! you are so subjected to a multitude of vulnerabilities! Yes, you always should think of user inputs pessimistically.

Script kiddies are not rare, bad doers also can take advantage of any solution of this kind, they adore when you store user textual data. Even with innocent inputs, ChatGPT would perform very poorly when text is malformed, this can happen because of many many reasons, outdated browser, human mistakes, mixing languages etc.

Arbitrary text can be dangerous

You need to escape bad HTML tags, fix mojibake and Unicode, detect text language, remove zalgos, fix spelling and grammar etc.

This is hard to put in one solution, many open source solutions are offered, some of them are implemented in Ruby or Python, some in C or Rust and others might be in JavaScript and WebAssembly. Furthermore, many text processing tasks rely heavily on machine learning models, like language detection or correct grammar.

Safe-text API

We have put dozens of technologies and machine learning models in one single API ! All you have to do is calling:

/api/clean_text?text=hello%20world&models=FixMojibak,Punctuat

It cannot be easier, only two inputs, your text and a set of available models ! Despite the heaving back-end processing and the amount of models applied (You can apply most or all of them in one single call!) latency is so low compared to other APIs based on heavy AI models.

We also promise more models and better accuracy in the near future :)

Enjoy the free-tier today and have a more robust and secure digital product :)

https://rapidapi.com/bacloud14/api/safe-text/
https://safe-text-api.com/

. . .
Terabox Video Player