|
15 | 15 | }, |
16 | 16 | "functions": [ |
17 | 17 | { |
18 | | - "name": "Hate Speech Check", |
19 | | - "id": "hateSpeech", |
| 18 | + "name": "Content Moderation Check", |
| 19 | + "id": "contentModeration", |
20 | 20 | "supportedHooks": ["beforeRequestHook", "afterRequestHook"], |
21 | 21 | "type": "guardrail", |
22 | 22 | "description": [ |
23 | 23 | { |
24 | 24 | "type": "subHeading", |
25 | | - "text": "Checks for hate speech in the user input or model output." |
26 | | - } |
27 | | - ], |
28 | | - "parameters": {} |
29 | | - }, |
30 | | - { |
31 | | - "name": "Dangerous Content Check", |
32 | | - "id": "dangerousContent", |
33 | | - "supportedHooks": ["beforeRequestHook", "afterRequestHook"], |
34 | | - "type": "guardrail", |
35 | | - "description": [ |
36 | | - { |
37 | | - "type": "subHeading", |
38 | | - "text": "Checks for dangerous content in the user input or model output." |
39 | | - } |
40 | | - ], |
41 | | - "parameters": {} |
42 | | - }, |
43 | | - { |
44 | | - "name": "Sexual Content Check", |
45 | | - "id": "sexualContent", |
46 | | - "supportedHooks": ["beforeRequestHook", "afterRequestHook"], |
47 | | - "type": "guardrail", |
48 | | - "description": [ |
49 | | - { |
50 | | - "type": "subHeading", |
51 | | - "text": "Checks for sexual content in the user input or model output." |
52 | | - } |
53 | | - ], |
54 | | - "parameters": {} |
55 | | - }, |
56 | | - { |
57 | | - "name": "Harassment Check", |
58 | | - "id": "harassment", |
59 | | - "supportedHooks": ["beforeRequestHook", "afterRequestHook"], |
60 | | - "type": "guardrail", |
61 | | - "description": [ |
62 | | - { |
63 | | - "type": "subHeading", |
64 | | - "text": "Checks for harassment in the user input or model output." |
65 | | - } |
66 | | - ], |
67 | | - "parameters": {} |
68 | | - }, |
69 | | - { |
70 | | - "name": "Instruction Following Check", |
71 | | - "id": "instructionFollowing", |
72 | | - "supportedHooks": ["afterRequestHook"], |
73 | | - "type": "guardrail", |
74 | | - "description": [ |
75 | | - { |
76 | | - "type": "subHeading", |
77 | | - "text": "Checks that the model followed the instructions provided in the prompt." |
| 25 | + "text": "Checks for dangerous content, sexual content, harassment, and dangerous content in the user input or model output." |
78 | 26 | } |
79 | 27 | ], |
80 | 28 | "parameters": {} |
|
90 | 38 | "text": "Checks that the model did not hallucinate." |
91 | 39 | } |
92 | 40 | ], |
93 | | - "parameters": {} |
| 41 | + "parameters": { |
| 42 | + "type": "object", |
| 43 | + "properties": { |
| 44 | + "mode": { |
| 45 | + "type": "string", |
| 46 | + "label": "Mode", |
| 47 | + "description": "The mode to use for the check", |
| 48 | + "enum": ["speed", "balanced", "quality"], |
| 49 | + "default": "balanced" |
| 50 | + } |
| 51 | + } |
| 52 | + } |
94 | 53 | }, |
95 | 54 | { |
96 | 55 | "name": "PII Check", |
|
129 | 88 | "text": "Checks that the model is grounded in the context provided." |
130 | 89 | } |
131 | 90 | ], |
132 | | - "parameters": {} |
| 91 | + "parameters": { |
| 92 | + "type": "object", |
| 93 | + "properties": { |
| 94 | + "mode": { |
| 95 | + "type": "string", |
| 96 | + "label": "Mode", |
| 97 | + "description": "The mode to use for the check", |
| 98 | + "enum": ["speed", "balanced", "quality"], |
| 99 | + "default": "balanced" |
| 100 | + } |
| 101 | + } |
| 102 | + } |
133 | 103 | }, |
134 | 104 | { |
135 | 105 | "name": "Tool Use Quality Check", |
|
142 | 112 | "text": "Checks the model's tool use quality. Including correct tool selection, correct tool parameters and values." |
143 | 113 | } |
144 | 114 | ], |
145 | | - "parameters": {} |
| 115 | + "parameters": { |
| 116 | + "type": "object", |
| 117 | + "properties": { |
| 118 | + "mode": { |
| 119 | + "type": "string", |
| 120 | + "label": "Mode", |
| 121 | + "description": "The mode to use for the check", |
| 122 | + "enum": ["speed", "balanced", "quality"], |
| 123 | + "default": "balanced" |
| 124 | + } |
| 125 | + } |
| 126 | + } |
146 | 127 | }, |
147 | 128 | { |
148 | 129 | "name": "Policy Violations Check", |
|
170 | 151 | } |
171 | 152 | ] |
172 | 153 | } |
| 154 | + }, |
| 155 | + "mode": { |
| 156 | + "type": "string", |
| 157 | + "label": "Mode", |
| 158 | + "description": "The mode to use for the check", |
| 159 | + "enum": ["speed", "balanced", "quality"], |
| 160 | + "default": "balanced" |
| 161 | + }, |
| 162 | + "policy_target": { |
| 163 | + "type": "string", |
| 164 | + "label": "Policy Target", |
| 165 | + "description": "Where to apply the policy check", |
| 166 | + "enum": ["input", "output", "both"], |
| 167 | + "default": "both" |
173 | 168 | } |
174 | 169 | }, |
175 | 170 | "required": ["policies"] |
|
0 commit comments