Class: PromptSanitizer::Configuration
- Inherits:
-
Object
- Object
- PromptSanitizer::Configuration
- Defined in:
- lib/prompt_sanitizer.rb
Overview
── Configuration ──────────────────────────────────────────────────────────
Instance Attribute Summary collapse
-
#audit_log ⇒ Object
Audit log backend: :none (default), :memory, :active_record.
-
#locale ⇒ Object
Locale for synthetic replacements (Faker locale string, e.g. "en", "fr").
-
#mode ⇒ Object
Detection mode: :fast, :smart, :full.
-
#ner_backend ⇒ Object
NER backend (used in :smart / :full mode): :informers, :mitie.
-
#ner_model ⇒ Object
NER model variant: "distilbert" (66 MB, default) or "bert-base" (110 MB).
-
#vault_store ⇒ Object
Vault persistence: :memory (default), :rails_cache, :active_record.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
45 46 47 48 49 50 51 52 |
# File 'lib/prompt_sanitizer.rb', line 45 def initialize @mode = :fast @ner_backend = :informers @ner_model = "distilbert" @vault_store = :memory @audit_log = :none @locale = "en" end |
Instance Attribute Details
#audit_log ⇒ Object
Audit log backend: :none (default), :memory, :active_record
40 41 42 |
# File 'lib/prompt_sanitizer.rb', line 40 def audit_log @audit_log end |
#locale ⇒ Object
Locale for synthetic replacements (Faker locale string, e.g. "en", "fr")
43 44 45 |
# File 'lib/prompt_sanitizer.rb', line 43 def locale @locale end |
#mode ⇒ Object
Detection mode: :fast, :smart, :full
28 29 30 |
# File 'lib/prompt_sanitizer.rb', line 28 def mode @mode end |
#ner_backend ⇒ Object
NER backend (used in :smart / :full mode): :informers, :mitie
31 32 33 |
# File 'lib/prompt_sanitizer.rb', line 31 def ner_backend @ner_backend end |
#ner_model ⇒ Object
NER model variant: "distilbert" (66 MB, default) or "bert-base" (110 MB)
34 35 36 |
# File 'lib/prompt_sanitizer.rb', line 34 def ner_model @ner_model end |
#vault_store ⇒ Object
Vault persistence: :memory (default), :rails_cache, :active_record
37 38 39 |
# File 'lib/prompt_sanitizer.rb', line 37 def vault_store @vault_store end |