Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please implement OpenAIModeration #1

Open
antononcube opened this issue Mar 13, 2023 · 0 comments
Open

Please implement OpenAIModeration #1

antononcube opened this issue Mar 13, 2023 · 0 comments

Comments

@antononcube
Copy link

It should be relatively easy to add/implement the function OpenAIModeration -- see OpenAI's moderation.

Here is an example of using the Raku module "WWW::OpenAI":

my @modRes = |openai-moderation(
"I want to kill them!",
format => "values",
method => 'curl');

for @modRes -> $m { .say for $m.pairs.sort(*.value).reverse; }
# violence => 0.9640626311302185
# hate => 0.27332669496536255
# hate/threatening => 0.00637523178011179
# sexual => 8.585161026530841e-07
# violence/graphic => 2.8522084249971158e-08
# self-harm => 1.678687522321809e-09
# sexual/minors => 1.3898265871503668e-09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant