name: "文本质量评估算子" description: "基于大语言模型对文本进行多维度质量评分。支持自定义模型、分块策略及评估维度,并发处理长文本。" language: "python" raw_id: "TextQualityEvaluator" version: "1.0.0" vendor: "DeepData User" modal: "text" inputs: "text" outputs: "text" types: - 'consolidate' release: - '修复缺失 accessType 和 isHttps 参数' runtime: memory: 2147483648 cpu: 0.5 storage: 50MB settings: # --- LLM 核心配置 --- LLMUrl: name: "LLM API 地址" type: "input" defaultVal: "http://ollama.ailab.ccoop.cc:18585/v1/chat/completions" required: true accessType: name: "使用标准 HTTP 请求" type: "switch" description: "开启后使用标准 requests 请求,关闭则尝试加载内部证书 (本地 Ollama 必须开启)" defaultVal: "true" isHttps: name: "使用 HTTPS" type: "switch" defaultVal: "false" LLMHeaders: name: "请求头 (JSON)" type: "textarea" defaultVal: '{"Content-Type": "application/json"}' LLMModel: name: "模型名称" type: "input" defaultVal: "qwen2.5:7b-instruct-q4_0" LLMBody: name: "请求体模板 (JSON)" type: "textarea" description: "使用 {model} 和 {prompt} 占位符" defaultVal: '{"model": "{model}", "messages": [{"role": "user", "content": "{prompt}"}]}' # --- 业务参数 --- chunk_size: name: "分块大小" type: "inputNumber" defaultVal: 2000 min: 500 max: 8000 step: 100 chunk_overlap: name: "重叠字符数" type: "inputNumber" defaultVal: 100 min: 0 max: 1000 step: 50 dimensions: name: "评估维度 (JSON)" type: "textarea" defaultVal: '[{"name": "连贯性", "desc": "逻辑通顺度"}, {"name": "信息密度", "desc": "有效信息占比"}]' prompt_template: name: "评估提示词" type: "textarea" defaultVal: "请作为资深数据专家,对以下文本进行多维度质量打分(0.0~1.0):\n\n【待评估文本】\n{context}\n\n【评估维度】\n{dimensions}\n\n请严格按照格式返回对应数量的逗号分隔的浮点数,不要输出其他内容。" max_workers: name: "并发线程数" type: "inputNumber" defaultVal: 5 min: 1 max: 20 step: 1