-
Notifications
You must be signed in to change notification settings - Fork 3
/
config_example.yaml
132 lines (125 loc) · 3.02 KB
/
config_example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
rules:
input:
- name: "language_detection"
type: "language_detection"
enabled: true
order_number: 1
config:
url: "https://api-inference.huggingface.co/models/papluca/xlm-roberta-base-language-detection"
apikey: ""
action:
type: "block" # blocking and logging
- name: "pii_example"
type: "pii_filter"
enabled: true
order_number: 2
config:
model_name: "value1"
model_url: "value2"
model_type: ""
plugin_name: "pii"
piiservice:
Debug: false
Port: 8080
PIIMethod: LLM
RuleBased:
PIIEntities:
- PERSON
- EMAIL_ADDRESS
- PHONE_NUMBER
- CREDIT_CARD
- US_SSN
- GENERIC_PII
NLPEngineName: transformers
Models:
- LangCode: en
ModelName:
spacy: en_core_web_sm
transformers: dslim/bert-base-NER
NERModelConfig:
ModelToPresidioEntityMapping:
loc: LOCATION
location: LOCATION
org: ORGANIZATION
organization: ORGANIZATION
per: PERSON
person: PERSON
phone: PHONE_NUMBER
action:
type: "block" # blocking and logging
# - type: "mask" # masking and logging
# - type: "monitoring" # logging
- name: "prompt_injection_example"
type: "prompt_injection"
plugin_name: "prompt_injection_llm"
threshold: 0.85
enabled: true
order_number: 3
config:
plugin_name: "prompt_injection_llm"
threshold: 0.85
action:
type: "block"
# - type: "monitoring" # logging
- name: "llamaguard_check"
type: "llama_guard"
enabled: true
order_number: 4
config:
plugin_name: "llama_guard"
threshold: 0.5
relation: ">"
# can be left empty, in that case every categgory is included.
#categories: ["S1","S7"]
action:
type: "block"
- name: "PromptGuard Injection Detection"
type: "prompt_guard"
enabled: true
order_number: 5
config:
plugin_name: "prompt_guard"
threshold: 0.7
relation: ">"
temperature: 3.0
action:
type: "block"
output:
- name: "pii_example"
type: "pii_filter"
config:
model_name: "value1"
model_url: "value2"
model_type: ""
action:
type: "block"
providers:
huggingface:
enabled: false
openai:
enabled: false
settings:
audit_logging:
enabled: false
cache:
enabled: true
ttl: 3600
prefix: openshield
context_cache:
enabled: true
database:
auto_migration: true
uri: postgresql://
network:
port: 10
rate_limiting:
enabled: true
max: 100
window: 60
redis:
ssl: true
uri: rediss://
rule_server:
url: http://localhost:8000
usage_logging:
enabled: false