Text Moderation
This skill allows users to perform text review on user-specified input text that may be inappropriate or offensive using an external GITEE AI API.
Usage
Ensure you have installed the required dependencies (pip install openai). Use the bundled script to perform text moderation.
CODEBLOCK0
Options
No additional parameters are required for this skill.
Workflow
- 1. Execute the performtextmoderation.py script with the parameters from the user.
- Parse the script output and find the line starting with
MODERATION_RESULT:. - Extract the moderation result from that line (format:
MODERATION_RESULT: ...). - Display the moderation result to the user using markdown syntax: INLINECODE3
Notes
- - If GITEEAIAPIKEY is none, you should remind user to provide --api-key argument
- You should not only return the moderation result but also provide a brief summary of the moderation result based on the user's input text.
- When you add prompt, you should honestly repeat the requirements from user without any additional imaginations.
- The script prints
MODERATION_RESULT: in the output - extract this result and display it using markdown image syntax:🛡️[Moderation Result]. - Always look for the line starting with
MODERATION_RESULT: in the script output.
文本审核
该技能允许用户使用外部GITEE AI API对用户指定的可能包含不当或冒犯性内容的输入文本进行文本审核。
使用方法
确保您已安装所需的依赖项(pip install openai)。使用捆绑脚本执行文本审核。
bash
python {baseDir}/scripts/performtextmoderation.py --text 用户指定的输入文本 --api-key 您的API密钥
选项
该技能无需额外参数。
工作流程
- 1. 使用用户提供的参数执行 performtextmoderation.py 脚本。
- 解析脚本输出,找到以 MODERATIONRESULT: 开头的行。
- 从该行中提取审核结果(格式:MODERATIONRESULT: ...)。
- 使用Markdown语法向用户展示审核结果:🛡️[审核结果]
注意事项
- - 如果 GITEEAIAPIKEY 为空,应提醒用户提供 --api-key 参数。
- 您不仅应返回审核结果,还应根据用户的输入文本提供审核结果的简要总结。
- 添加提示时,应如实重复用户的要求,不得添加任何额外想象。
- 脚本会在输出中打印 MODERATIONRESULT: — 提取该结果并使用Markdown图片语法展示:🛡️[审核结果]。
- 始终在脚本输出中查找以 MODERATIONRESULT: 开头的行。