Skip to content

safety logic #4

@genekogan

Description

@genekogan

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}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions