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

Fixes and refactors of OpenAI stuff #326

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Fixes and refactors of OpenAI stuff #326

merged 2 commits into from
Nov 1, 2023

Conversation

mruwnik
Copy link
Collaborator

@mruwnik mruwnik commented Oct 31, 2023

There were a few problems with the OpenAI moderation endpoint, and I also tidied a couple of things up a bit. Is the gpt3module even needed anymore, since there is a chatgpt one that does pretty much the same? Removing it would allow removing most of the OpenAI class, which would also clean a lot of stuff. Most of my changes here were to get the old code to work

allowed_categories = frozenset("violence") # Can be triggered by some AI safety terms
See https://platform.openai.com/docs/guides/moderation/quickstart for details.
"""
allowed_categories = {"violence"} # Can be triggered by some AI safety terms
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ProducerMatt - could you please include a list of the known AI safety terms that trigger the violence thingy? I don't like this blank check to allow violence because of "some" terms...

api/openai.py Outdated Show resolved Hide resolved
@mruwnik mruwnik merged commit b4b9e61 into master Nov 1, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants