Closed Paillat-dev closed 10 months ago
Sounds good! I'm open to having it be a switchable system with the env file. I'd appreciate a PR on it-- some notes: you'll have to abstract the moderation system a tiny bit more to allow for a toggle in the underlying moderations call and it might also involve abstracting the different moderation values if the schemas are different between openai and google, like if something is called "hate" in one but called something else in another you have to normalize them, feel free to make a new scheme of your choosing for that. make the default one be the openai one, add a new section to the moderations readme
let me know if you need any help
Also, for perspective it seems for free users it's 1 request per second so the moderation requests have to queue up with a gap slightly larger than a second between them, so the moderation task's click will have to be increased I think
Also, for perspective it seems for free users it's 1 request per second so the moderation requests have to queue up with a gap slightly larger than a second between them, so the moderation task's click will have to be increased I think
I'll dig more into it, but from my previous testing for another project, it was already supported by the google cloud lib, no queue was needed on my side.
Ill close this
I think that it could be interesting to add support for google's perspectiveapi, a machine learning service that works similarly to openai's moderation endpoint, and is also free. It would probably need to have an env variable defining the system to use, and add new moderation values. Here are the ones supported by perspective: .
I migth be able to do it, if I have time, but I'm asking here if it would be appropriate first in order not to work for nothing.