Giter VIP home page Giter VIP logo

chat-guard's Introduction

ChatGuard

Description

ChatGuard is a GitHub Action designed to leverage ChatGPT for sentiment analysis of comments and discussions within your repository. It enhances community management by identifying and handling content that includes spam, advertisements, or offensive language. ChatGPT provides valuable insights into why specific comments are flagged.

Usage

  1. Set up Workflow:
  • Create a new workflow file (e.g., .github/workflows/chatguard.yml).
  • Configure the workflow to trigger on events where sentiment analysis is necessary.
name: ChatGuard

on:
  issues:
    types:
      - opened
  issue_comment:
    types:
      - created
      - edited
  pull_request_review_comment:
    types:
      - created
      - edited
  1. Add ChatGuard Action:

Add the ChatGuard action to your workflow, specifying the necessary parameters.

jobs:
  analyze_content:
    runs-on: ubuntu-latest

    steps:
    - name: Analyze Comments with ChatGPT
      uses: nikpivkin/chat-guard@v0
      with:
        gh-token: ${{ secrets.GITHUB_TOKEN }}
        openai-api-key: ${{ secrets.OPENAI_API_KEY }}

Inputs

Name Description Default
gh-token GitHub personal access token.
openai-api-key API token for ChatGPT. Required
gpt-model The ChatGPT model used. See available models here. "gpt-3.5-turbo"
timeout Timeout in seconds. 60

License

This project is licensed under the MIT License.

chat-guard's People

Contributors

nikpivkin avatar

Watchers

 avatar

chat-guard's Issues

improve commenting

If negative sentiment content is contained in a comment, the action should respond to that comment.

bug: false positive

Closed via https://github.com/nikpivkin/chat-guard/pull/8

ChatGuard Analysis: The content has been reviewed, and based on sentiment analysis, it has been identified as .

Explanation:

This comment has been labeled accordingly for further review.

@nikpivkin please ensure future contributions align with our community guidelines. Thank you! ๐Ÿš€

Note: This message is generated automatically

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.