AI Chat Moderation

插件

· 作者 Ssomar

基于 AI 的聊天审核插件,防止玩家发送有害内容。

0 本站下载 0 关注 更新于 1 年前

最新 1.25.10.16 · 1.21.10 · Bukkit / Folia

一键开服(送7天)

利用先进的 AI 技术,让您的 Minecraft 服务器聊天保持干净和安全!

AI Chat Moderation 是一款强大的插件,它使用人工智能来检测和过滤您 Minecraft 服务器聊天中的有害信息。通过可自定义的检测类别和响应操作,您可以为所有玩家营造一个欢迎的环境。

该插件使用 OPENAI 或 Mistral AI 模型,无需 API 密钥

功能

  • 高级 AI 检测:识别包括骚扰、仇恨言论、威胁、暴力和不当性内容在内的 12 类有害内容,支持所有语言。
  • 可自定义的置信度级别:微调每个类别的检测灵敏度
  • 灵活的响应系统:为不同类型的违规行为配置独特的响应
  • 实时审核:可选择在消息发送前或发送后进行检查
  • 全面的日志记录:在服务器控制台中跟踪被标记的消息
  • 易于配置:简单的 YAML 文件,包含详细选项

安装

只需将插件 jar 拖放到您的 plugins 文件夹中即可! 无需创建 OPENAI 密钥。为了消除任何疑虑,消息可能会被缓存在我的程序中,仅出于性能目的。

工作原理

该插件使用 AI 技术分析每条聊天消息,以确定其是否包含有害内容。当检测到潜在的有害内容时,插件可以:

  • 对其他玩家隐藏该消息
  • 向违规玩家发送警告消息
  • 根据违规类型执行自定义命令
  • 对严重违规行为进行踢出或其他管理操作

为您的审核人员提供维持积极社区所需的工具,而无需持续监控聊天。AI Chat Moderation 在后台无声工作,让您能够专注于构建和游戏,同时确保服务器对所有人都是安全的。

命令

  • /acm reload : 重新加载插件
  • /acm debug : 查看每条发送消息的类别置信度。这允许您轻松调整类别置信度。

权限

  • acm.reload : 能够使用 /acm reload
  • acm.debug : 能够使用 /acm debug
  • acm.bypass : 绕过检查(默认情况下 OP 可绕过)

AI Chat Moderation - 为您的 Minecraft 社区提供智能保护

配置文件:

# 启用或禁用插件
enabled: true

# ---- 非 AI 部分 ----
# 在不使用 AI 的情况下屏蔽某些词语
blacklisted-words:
  - fuck you
  - retarded
# 当消息包含黑名单中的词语时,是否隐藏该消息
blacklisted-words-hide-message: true
# 如果消息包含黑名单中的词语,要运行的命令
blacklisted-words-commands:
  - "SEND_MESSAGE &6%player% &c请使用正确的语言。"

# ---- AI 部分 ----
# 选择您的提供商 OPENAI 或 MISTRAL 或 DETOXIFY
# + Mistral 更适合阿拉伯语和俄语
# + OpenAI 响应速度更快
# + Detoxify 非常快,适合 IT、法语、俄语、葡萄牙语、西班牙语、土耳其语,但当侮辱被拆分/书写不佳/缩写时检测效果不佳

providers: [DETOXIFY, OPENAI]
# True: 插件将在控制台中记录被标记的消息
# False: 插件将不会在控制台中记录被标记的消息
logs-flagged-messages: true
logged-message-format: "Flagged message: Player:[%player%] - Message:[%message%] - Category:[%category%] - Confidence[%confidence%]"
# True: 插件将在消息发送前进行检查(消息会有大约 0.3 秒的延迟)
# False: 插件将在消息发送后进行检查(消息不会有延迟),但如果消息被标记,消息不会被删除
check-after-message-has-been-sent: false
# 插件可以检测的不同有害类别
categories:
  # OPENAI
  illicit/violent:
    # True: 插件将检测此类别中的消息
    # False: 插件将不会检测此类别中的消息
    detection: true
    # 当在此类别中检测到消息时,插件将执行的操作
    actions:
      warn:
        # 调整检测此类别中消息的置信度水平
        # 值越高,插件仅会检测具有高度有害强度的消息
        # 值越低,插件会检测具有低强度有害性的消息
        # 范围从 0.0 到 1.0,0.85 是一个合适的值
        confidence: 0.80
        # 插件是否向玩家隐藏该消息
        hideMessage: true
        # 当在此类别中检测到消息时,插件将执行的命令
        # 占位符:%player%:发送消息的玩家
        #               %player_uuid%:发送消息的玩家的 UUID
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用暴力语言。"
      other:
        confidence: 0.95
        hideMessage: true
        commands:
          - "kick %player%"
  # OPENAI
  self-harm/instructions:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用自残指导。"
  # OPENAI
  harassment:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许骚扰其他玩家。"
  # OPENAI
  violence/graphic:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用暴力。"
  # OPENAI
  illicit:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用非法语言。"
  # OPENAI
  self-harm/intent:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许有自残意图。"
  # OPENAI
  hate/threatening:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用威胁性语言。"
  # OPENAI
  sexual/minors:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用色情语言。"
  # OPENAI
  harassment/threatening:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用威胁性语言。"
  # OPENAI
  hate:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用仇恨语言。"
  # OPENAI
  self-harm:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用自残语言。"
  # OPENAI and MISTRAL
  sexual:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用色情语言。"
  # OPENAI
  violence:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用暴力语言。"
  # MISTRAL
  # 表达偏见、敌意或基于种族、民族、宗教、性别、性取向或残疾等受保护特征,倡导对个人或群体进行歧视的内容。这包括侮辱性语言、非人化语言、针对特定群体的排斥或伤害呼吁,以及基于这些特征对个人的持续骚扰或欺凌。
  hate_and_discrimination:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用仇恨语言。"
  # MISTRAL
  # 描述、美化、煽动或对个人或群体实施身体暴力的内容。这包括受伤或死亡的详细描写、明确的伤害威胁以及实施暴力行为的指导。此类别涵盖针对特定目标的威胁以及一般的暴力推广或美化。
  violence_and_threats:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c您不允许使用暴力语言。"
  # MISTRAL

# 促进或提供非法活动或极端危险行为指导的内容,这些行为可能对人身造成伤害、死亡或导致法律后果。这包括关于制造武器或爆炸物的指导、鼓励采取极端冒险行为,以及推广非暴力犯罪(如欺诈、盗窃或贩毒)。
  dangerous_and_criminal_content:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用暴力语言。"
  # MISTRAL
  # 促进、指导、策划或鼓励故意自残、自杀、饮食失调或其他自我毁灭行为的内容。这包括详细的方法、美化此类行为、表达意图的声明、危险挑战及相关俚语术语。
  selfharm:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用暴力语言。"
  # MISTRAL
  # 包含或试图获取详细或个性化医疗建议的内容。
  health:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用个性化医疗语言。"
  # MISTRAL
  # 包含或试图获取详细或个性化财务建议的内容。
  financial:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用财务语言。"
  # MISTRAL
  # 包含或试图获取详细或个性化法律建议的内容。
  law:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许诱导获取详细语言。"
  # MISTRAL
  # 请求、分享或试图获取个人身份信息(如全名、地址、电话号码、社会安全号码或财务账户详情)的内容。
  pii:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许泄露个人信息。"
  # DETOXIFY
  toxicity:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用有毒语言。"
  # DETOXIFY
  sexual_explicit:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用露骨色情语言。"
  # DETOXIFY
  severe_toxicity:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用严重有毒语言。"
  # DETOXIFY
  obscene:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用淫秽语言。"
  # DETOXIFY
  threat:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用威胁语言。"
  # DETOXIFY
  identity_attack:
    detection: true
    actions:
      warn:
        confidence: 0.80
        hideMessage: true
        commands:
          - "SEND_MESSAGE &6%player% &c你不允许使用威胁语言。"

# 净化
  侮辱:
    检测:true
    操作:
      警告:
        置信度:0.80
        隐藏消息:true
        命令:
          - "发送消息 &6%玩家% &c你不允许使用侮辱性语言。"

打印 API 错误:false # 用于调试目的,建议在生产环境中将其设置为 false

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源