-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Missing moderation categories #633
Comments
guess they updated their moderation API. should be trivial PR if anyone wants to update those categories! |
I would be interested if anyone has any thoughts on my suggestion:
|
seems fair! compatibility on this endpoint seems to be 'best effort' from their side anyways, enforcing that callers be careful about ensuring that the field they want exists in the map is probably good practice, and means that there's less code maintenance required in the future here |
Describe the bug
The moderations endpoint returns a number of categories that are not supported by go-openai. I'm not going to list them here, but the entire
harrassment
category is missing, along with some subcategories.To Reproduce
Take a look at the categories listed by:
and compare it with the list in https://github.com/sashabaranov/go-openai/blob/master/moderation.go
Expected behavior
I expect all moderation categories to be available in the
openai.ResultCategories
andopenai.ResultCategoryScores
structs.Suggestion: Perhaps the moderation code could use map types, instead of having hard-coded fields. That way, the code would not have to change everytime OpenAI adds a new moderation type.
Screenshots/Logs
If applicable, add screenshots to help explain your problem. For non-graphical issues, please provide any relevant logs or stack traces.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: