跳至主要内容

Playground

这条帖子会被删吗?

这条帖子会被删吗?吐槽周一开会仍判为安全,针对一个群体的辱骂则判为应删除。

相关文章Agent 护栏怎么做?用是非概率拦截危险工具调用和违规内容

示例结果不随所选模型变化。

请求

state
application/json
{  "post": "周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"}

结果

示例数据
对比两个例子

两个例子只差一处,结果会跟着变。

改了什么吐槽开会 → 针对某个群体的辱骂

以下结果为示例数据,并非模型实时输出。登录后可以换成你自己的内容。
severity:2 · 违规 → 0 · 安全 targetsGroup:置信度 = 0.89 → 置信度 = 0.02
severityscore
0 · 安全
各选项置信度
0 · 安全
88%
1 · 擦边
10%
2 · 违规
2%
3 · 必删
1%
targetsGroupnoul
置信度 = 0.02置信度

复制代码

设置 SYSTEM_ONE_API_KEY。代码片段使用目录中已发布的模型 id。

请求 JSON
application/json
{"model":"decider-v1.1","state":{"post":"周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"},"questions":{"severity":{"type":"score","instructions":"How would a typical platform policy rate this post?","criteria":["安全","擦边","违规","必删"]},"targetsGroup":{"type":"noul","instructions":"Does the post attack a specific protected group?"}}}
cURL · POST /v1/systemone
sh
curl "https://system-one.dev/v1/systemone" \  -H "Authorization: Bearer $SYSTEM_ONE_API_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: saved-operation-id' \  --data '{"model":"decider-v1.1","state":{"post":"周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"},"questions":{"severity":{"type":"score","instructions":"How would a typical platform policy rate this post?","criteria":["安全","擦边","违规","必删"]},"targetsGroup":{"type":"noul","instructions":"Does the post attack a specific protected group?"}}}'
TypeScript
TypeScript
// npm install @system-one-ai/core@0.6.0 @system-one-ai/transport-fetch@0.6.0 @system-one-ai/adapter-system-one@0.6.0import { createSystemOne, choice, score, booleanQuestion } from '@system-one-ai/core';import { systemOneAdapter } from '@system-one-ai/adapter-system-one';import { createFetchTransport } from '@system-one-ai/transport-fetch';const client = createSystemOne({  baseURL: "https://system-one.dev/v1",  apiKey: process.env.SYSTEM_ONE_API_KEY!,  model: "decider-v1.1",  adapter: systemOneAdapter,  transport: createFetchTransport(),  timeoutMs: 30_000,  maxRetries: 0,});const result = await client.evaluate({  state: {    "post": "周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"  },  questions: {  severity: score("How would a typical platform policy rate this post?", ["安全", "擦边", "违规", "必删"]),  targetsGroup: booleanQuestion("Does the post attack a specific protected group?"),  },}, { headers: { 'Idempotency-Key': crypto.randomUUID() } });result.answers.severity.scoreresult.answers.targetsGroup.probabilityresult.response.requestId;