severityscoreConfiance par option
0 · Sûr88%
1 · Limite10%
2 · Enfreint2%
3 · À supprimer1%
Playground
Ce post sera-t-il supprimé ? Une blague sur les réunions du lundi reste ; les abus visant un groupe sont signalés pour suppression.
{ "post": "Monday morning’s meeting could have been an email, and that email could have not existed. ☕️ #office"}
Ces deux exemples ne diffèrent que d’un détail. Le résultat change avec eux.
Ce qui a changéBlague de bureau → abus visant un groupe
severityscore0 · Sûr1 · Limite2 · Enfreint3 · À supprimertargetsGroupnoulDéfinissez SYSTEM_ONE_API_KEY. L’extrait utilise un ID de modèle publié dans le catalogue.
{"model":"decider-v1.1","state":{"post":"Monday morning’s meeting could have been an email, and that email could have not existed. ☕️ #office"},"questions":{"severity":{"type":"score","instructions":"How would a typical platform policy rate this post?","criteria":["Sûr","Limite","Enfreint","À supprimer"]},"targetsGroup":{"type":"noul","instructions":"Does the post attack a specific protected group?"}}}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":"Monday morning’s meeting could have been an email, and that email could have not existed. ☕️ #office"},"questions":{"severity":{"type":"score","instructions":"How would a typical platform policy rate this post?","criteria":["Sûr","Limite","Enfreint","À supprimer"]},"targetsGroup":{"type":"noul","instructions":"Does the post attack a specific protected group?"}}}'// npm install @system-one-ai/core@0.8.0 @system-one-ai/adapter-system-one@0.7.0 @system-one-ai/transport-fetch@0.8.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": "Monday morning’s meeting could have been an email, and that email could have not existed. ☕️ #office" }, questions: { severity: score("How would a typical platform policy rate this post?", ["Sûr", "Limite", "Enfreint", "À supprimer"]), targetsGroup: booleanQuestion("Does the post attack a specific protected group?"), },}, { headers: { 'Idempotency-Key': crypto.randomUUID() } });result.answers.severity.scoreresult.answers.targetsGroup.probabilityresult.response.requestId;