返回顶部
G

GPT AnalyzerGPT分析器

GPT-specific pattern detection with model fingerprinting and version identification

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
636
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

GPT Analyzer

GPT分析器

针对GPT生成内容的专业检测,具备模型特定模式识别功能。

实现

javascript
/
* 分析文本中的GPT特定模式和指纹
* @param {string} text - 待分析文本
* @param {object} options - 配置选项
* @returns {object} 包含模型识别的分析结果
*/
async function analyzeGPTContent(text, options = {}) {
const {
detectVersion = true,
checkWatermarks = true,
minConfidence = 0.7
} = options;

const normalizedText = text.toLowerCase();
const wordCount = text.split(/\s+/).length;

// GPT特定短语(较强指示器)
const gptPhrases = {
gpt-4: [
深入探讨, 的格局, 的领域, 值得注意的是,
多方面的, 微妙的, 全面的, 整体方法
],
gpt-3.5: [
作为一个AI语言模型, 我没有个人, 我为此道歉,
当然, 绝对, 此外, 而且
],
common: [
值得指出的是, 请记住, 总之,
总结来说, 概括而言, 应对, 的织锦
]
};

// 模型指纹识别
let gpt4Score = 0;
let gpt35Score = 0;
let commonScore = 0;
const foundPhrases = [];

// 检查GPT-4特定模式
for (const phrase of gptPhrases[gpt-4]) {
if (normalizedText.includes(phrase)) {
gpt4Score += 0.2;
foundPhrases.push({ phrase, model: gpt-4 });
}
}

// 检查GPT-3.5特定模式
for (const phrase of gptPhrases[gpt-3.5]) {
if (normalizedText.includes(phrase)) {
gpt35Score += 0.2;
foundPhrases.push({ phrase, model: gpt-3.5 });
}
}

// 检查通用GPT模式
for (const phrase of gptPhrases[common]) {
if (normalizedText.includes(phrase)) {
commonScore += 0.1;
foundPhrases.push({ phrase, model: common });
}
}

// 结构分析
const hasNumberedLists = (text.match(/\n\d+\./g) || []).length >= 3;
const hasBulletPoints = (text.match(/\n[•\-\*]/g) || []).length >= 3;
const structureScore = (hasNumberedLists || hasBulletPoints) ? 0.15 : 0;

// 句子一致性
const sentences = text.split(/[.!?]+/).filter(s => s.trim());
const avgLength = sentences.reduce((sum, s) => sum + s.length, 0) / sentences.length;
const variance = sentences.reduce((sum, s) => sum + Math.pow(s.length - avgLength, 2), 0) / sentences.length;
const uniformityScore = variance < 500 ? 0.1 : 0;

// 计算置信度
const totalScore = gpt4Score + gpt35Score + commonScore + structureScore + uniformityScore;
const confidence = Math.min(totalScore, 1.0);

// 确定模型
let detectedModel = unknown;
if (gpt4Score > gpt35Score && gpt4Score > 0) {
detectedModel = gpt-4;
} else if (gpt35Score > gpt4Score && gpt35Score > 0) {
detectedModel = gpt-3.5;
} else if (commonScore > 0) {
detectedModel = gpt-family;
}

const isGPT = confidence >= minConfidence;

return {
isGPT,
confidence: Math.round(confidence * 100),
detectedModel: isGPT ? detectedModel : not-gpt,
scores: {
gpt4: Math.round(gpt4Score * 100) / 100,
gpt35: Math.round(gpt35Score * 100) / 100,
common: Math.round(commonScore * 100) / 100,
structure: Math.round(structureScore * 100) / 100,
uniformity: Math.round(uniformityScore * 100) / 100
},
indicators: {
foundPhrases: foundPhrases.length,
hasStructure: hasNumberedLists || hasBulletPoints,
avgSentenceLength: Math.round(avgLength),
sentenceVariance: Math.round(variance)
},
recommendation: confidence >= 0.85 ? 极可能为GPT生成 :
confidence >= 0.70 ? 可能为GPT生成 :
confidence >= 0.50 ? 疑似GPT生成 :
不太可能是GPT或为人工撰写
};
}

// 为OpenClaw导出
module.exports = {
analyzeGPTContent
};

使用

javascript
const result = await skills.gptAnalyzer.analyzeGPTContent(text);

if (result.isGPT) {
console.log(检测到GPT:${result.detectedModel}(置信度${result.confidence}%));
}

配置

json
{
detectVersion: true,
minConfidence: 0.7
}

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gpt-analyzer-1776420050 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gpt-analyzer-1776420050 技能

通过命令行安装

skillhub install gpt-analyzer-1776420050

下载

⬇ 下载 GPT Analyzer v1.0.0(免费)

文件大小: 2.25 KB | 发布时间: 2026-4-17 18:51

v1.0.0 最新 2026-4-17 18:51
- Initial release of GPT Analyzer (v1.0.0).
- Detects GPT-generated content with model-specific pattern recognition and fingerprinting.
- Identifies likely GPT version (gpt-4, gpt-3.5, or general GPT-family).
- Provides confidence scoring and analysis indicators.
- Offers recommendation labels (e.g., "Very likely GPT").
- Allows configuration of detection options and confidence threshold.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部