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

safety logic #4

Open
genekogan opened this issue Jun 20, 2022 · 0 comments
Open

safety logic #4

genekogan opened this issue Jun 20, 2022 · 0 comments

Comments

@genekogan
Copy link
Member

The logic in the content filter is such that the openai content filter is always called even if use_content_filter is false (and then is disregarded). I think a better logic would be:

        if not use_content_filter:
            response_safe = True
        else:
            response_safe = OpenAIGPT3LanguageModel.content_safe(completion_text)
            if not response_safe:
                print(f"Completion flagged unsafe: {completion_text}")
                logging.info(f"Completion flagged unsafe: {completion_text}")
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