Skip to content

Commit 928fbd6

Browse files
fix : plugin index file
1 parent 07e0ffb commit 928fbd6

File tree

1 file changed

+49
-15
lines changed

1 file changed

+49
-15
lines changed

plugins/index.ts

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import { handler as defaultwebhook } from './default/webhook';
1010
import { handler as defaultlog } from './default/log';
1111
import { handler as defaultcontainsCode } from './default/containsCode';
1212
import { handler as defaultalluppercase } from './default/alluppercase';
13-
import { handler as defaultendsWith } from './default/endsWith';
1413
import { handler as defaultalllowercase } from './default/alllowercase';
15-
import { handler as defaultmodelwhitelist } from './default/modelwhitelist';
16-
import { handler as defaultjwt } from './default/jwt';
17-
import { handler as defaultrequiredMetadataKeys } from './default/requiredMetadataKeys';
14+
import { handler as defaultendsWith } from './default/endsWith';
15+
import { handler as defaultmodelWhitelist } from './default/modelWhitelist';
1816
import { handler as portkeymoderateContent } from './portkey/moderateContent';
1917
import { handler as portkeylanguage } from './portkey/language';
2018
import { handler as portkeypii } from './portkey/pii';
@@ -34,12 +32,24 @@ import { handler as patronusnoRacialBias } from './patronus/noRacialBias';
3432
import { handler as patronusretrievalAnswerRelevance } from './patronus/retrievalAnswerRelevance';
3533
import { handler as patronustoxicity } from './patronus/toxicity';
3634
import { handler as patronuscustom } from './patronus/custom';
35+
import { mistralGuardrailHandler } from './mistral';
3736
import { handler as pangeatextGuard } from './pangea/textGuard';
37+
import { handler as promptfooPii } from './promptfoo/pii';
38+
import { handler as promptfooHarm } from './promptfoo/harm';
39+
import { handler as promptfooGuard } from './promptfoo/guard';
3840
import { handler as pangeapii } from './pangea/pii';
39-
import { handler as promptsecurityprotectPrompt } from './promptsecurity/protectPrompt';
40-
import { handler as promptsecurityprotectResponse } from './promptsecurity/protectResponse';
41+
import { pluginHandler as bedrockHandler } from './bedrock/index';
42+
import { handler as acuvityScan } from './acuvity/scan';
43+
import { handler as lassoclassify } from './lasso/classify';
44+
import { handler as exaonline } from './exa/online';
45+
import { handler as azurePii } from './azure/pii';
46+
import { handler as azureContentSafety } from './azure/contentSafety';
47+
import { handler as promptSecurityProtectPrompt } from './promptsecurity/protectPrompt';
48+
import { handler as promptSecurityProtectResponse } from './promptsecurity/protectResponse';
4149
import { handler as panwPrismaAirsintercept } from './panw-prisma-airs/intercept';
42-
import { handler as walledaiguardrails } from './walledai/guardrails';
50+
import { handler as defaultjwt } from './default/jwt';
51+
import { handler as defaultrequiredMetadataKeys } from './default/requiredMetadataKeys';
52+
import { handler as walledaiguardrails } from "./walledai/guardrails"
4353

4454
export const plugins = {
4555
default: {
@@ -55,9 +65,9 @@ export const plugins = {
5565
log: defaultlog,
5666
containsCode: defaultcontainsCode,
5767
alluppercase: defaultalluppercase,
58-
endsWith: defaultendsWith,
5968
alllowercase: defaultalllowercase,
60-
modelwhitelist: defaultmodelwhitelist,
69+
endsWith: defaultendsWith,
70+
modelWhitelist: defaultmodelWhitelist,
6171
jwt: defaultjwt,
6272
requiredMetadataKeys: defaultrequiredMetadataKeys,
6373
},
@@ -90,18 +100,42 @@ export const plugins = {
90100
toxicity: patronustoxicity,
91101
custom: patronuscustom,
92102
},
103+
mistral: {
104+
moderateContent: mistralGuardrailHandler,
105+
},
93106
pangea: {
94107
textGuard: pangeatextGuard,
95108
pii: pangeapii,
96109
},
110+
promptfoo: {
111+
pii: promptfooPii,
112+
harm: promptfooHarm,
113+
guard: promptfooGuard,
114+
},
115+
bedrock: {
116+
guard: bedrockHandler,
117+
},
118+
acuvity: {
119+
scan: acuvityScan,
120+
},
121+
lasso: {
122+
classify: lassoclassify,
123+
},
124+
exa: {
125+
online: exaonline,
126+
},
127+
azure: {
128+
pii: azurePii,
129+
contentSafety: azureContentSafety,
130+
},
97131
promptsecurity: {
98-
protectPrompt: promptsecurityprotectPrompt,
99-
protectResponse: promptsecurityprotectResponse,
132+
protectPrompt: promptSecurityProtectPrompt,
133+
protectResponse: promptSecurityProtectResponse,
100134
},
101135
'panw-prisma-airs': {
102136
intercept: panwPrismaAirsintercept,
103137
},
104-
walledai: {
105-
guardrails: walledaiguardrails,
106-
},
107-
};
138+
"walledai": {
139+
"guardrails": walledaiguardrails
140+
}
141+
};

0 commit comments

Comments
 (0)