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

Add perspectiveapi for moderation #406

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Commits on Nov 14, 2023

  1. refactor(language detection): rename FORCE_ENGLISH to FORCE_LANGUAGE,…

    … add new languages with perspective. Move language check before moderation.
    
    This change is NON BREAKING, the FORCE_ENGLISH environement variable still works.
    Paillat-dev committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    aeabd88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b5ef501 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b47f38a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    49478db View commit details
    Browse the repository at this point in the history
  5. feat(moderation): add get_moderation_service, get_language_detect_ser…

    …vice, get_force_language, get_perspective_api_key, get_max_perspective_requests_per_second functions
    
    This is NON BREAKING, the FORCE_ENGLISH env variable still works.
    Paillat-dev committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    4e62487 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b0956c3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7215cf1 View commit details
    Browse the repository at this point in the history
  8. fix(moderations_service.py): change send_moderations_request method s…

    …ignature to include an optional override_model parameter
    
    fix(moderations_service.py): update send_moderations_request method to check for override_model parameter and use it to determine which model to use
    fix(moderations_service.py): update set_thumbnail method in Moderation class to conditionally set the thumbnail URL based on the model type
    fix(moderations_service.py): update set_thumbnail method in Moderation class to conditionally set the thumbnail URL based on the language_detect_type
    Paillat-dev committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    f2ae881 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dbafafc View commit details
    Browse the repository at this point in the history
  10. fix(moderations_service.py): add spoiler tags to moderated message co…

    …ntent in the notification embed to hide sensitive information
    Paillat-dev committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    2a18e80 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e1ab81e View commit details
    Browse the repository at this point in the history
  12. fix(moderations_service.py): fix import formatting and add missing li…

    …ne breaks for better readability
    
    feat(moderations_service.py): add support for language detection using OpenAI and Perspective models
    feat(moderations_service.py): add moderation messages for different languages to be sent to users when their messages are moderated
    fix(moderations_service.py): fix method signature and add missing line breaks for better readability
    Paillat-dev committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    722e381 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. fix(perspective_model.py): remove "languages" from ANALYZE_REQUEST an…

    …d ANALYZE_REQUEST_NOT_EN to allow language detection
    
    fix(perspective_model.py): add exception handling for languageNotSupportedByAttribute when using ANALYZE_REQUEST_NOT_EN
    fix(moderations_service.py): add docstrings to send_language_detect_request and send_moderations_request methods
    fix(moderations_service.py): add exception handling for languageNotSupportedByAttribute in send_moderations_request method
    fix(moderations_service.py): add exception handling for languageNotSupportedByAttribute in moderation loop to ignore messages with unsupported languages
    Paillat-dev committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    5178320 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1209916 View commit details
    Browse the repository at this point in the history
  3. refactor(moderations_service.py): add docstring to ModerationModel cl…

    …ass to improve code readability and documentation
    Paillat-dev committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    d517ba4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5bfe52a View commit details
    Browse the repository at this point in the history
  5. chore(AI-MODERATION.md): reorganize and improve readability of the AI…

    … Moderation guide
    
    The AI Moderation guide has been reorganized and improved for better readability and understanding. The changes include:
    
    - Renaming the section titles to be more descriptive.
    - Adding a section for choosing between the OpenAI and PerspectiveAPI moderation services.
    - Providing separate commands and thresholds for each moderation service.
    - Adding a section for language detection and the force language feature.
    - Including additional configuration options and instructions.
    - Removing the note about the server not being for support or discussions about GPT3Discord.
    
    These changes aim to make it easier for users to understand and configure the AI Moderation feature.
    Paillat-dev committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    067863c View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2023

  1. Configuration menu
    Copy the full SHA
    4e79f18 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Merge branch 'main' into google-perspective

    Signed-off-by: Paillat <[email protected]>
    Paillat-dev authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    41f846c View commit details
    Browse the repository at this point in the history