@@ -3801,6 +3801,7 @@ export type ModerationConfig = {
38013801 automod_semantic_filters_config ?: AutomodSemanticFiltersConfig ;
38023802 automod_toxicity_config ?: AutomodToxicityConfig ;
38033803 block_list_config ?: BlockListConfig ;
3804+ llm_config ?: LLMConfig ;
38043805 team ?: string ;
38053806} ;
38063807
@@ -4004,6 +4005,8 @@ export type ModerationActionType =
40044005 | 'bounce_flag'
40054006 | 'bounce_remove' ;
40064007
4008+ export type ModerationSeverity = 'low' | 'medium' | 'high' | 'critical' ;
4009+
40074010export type AutomodRule = {
40084011 action : ModerationActionType ;
40094012 label : string ;
@@ -4021,6 +4024,24 @@ export type BlockListConfig = {
40214024 async ?: boolean ;
40224025} ;
40234026
4027+ export type LLMConfig = {
4028+ rules : LLMRule [ ] ;
4029+ severity_descriptions ?: Record < ModerationSeverity , string > ;
4030+ app_context ?: string ;
4031+ } ;
4032+
4033+ export type LLMRule = {
4034+ label : string ;
4035+ description : string ;
4036+ action : ModerationActionType ;
4037+ severity_rules ?: LLMSeverityRule [ ] ;
4038+ } ;
4039+
4040+ export type LLMSeverityRule = {
4041+ severity : ModerationSeverity ;
4042+ action : ModerationActionType ;
4043+ } ;
4044+
40244045export type AutomodToxicityConfig = {
40254046 enabled : boolean ;
40264047 rules : AutomodRule [ ] ;
@@ -4047,7 +4068,7 @@ export type AutomodSemanticFiltersConfig = {
40474068
40484069export type AITextSeverityRule = {
40494070 action : ModerationActionType ;
4050- severity : 'low' | 'medium' | 'high' | 'critical' ;
4071+ severity : ModerationSeverity ;
40514072} ;
40524073
40534074export type AITextRule = {
0 commit comments