Skip to content

Commit

Permalink
Move New providers to ruleserver (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
pigri authored Dec 4, 2024
2 parents cfa193d + c1630eb commit 33a7627
Show file tree
Hide file tree
Showing 13 changed files with 455 additions and 613 deletions.
29 changes: 29 additions & 0 deletions config_example.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
rules:




input:
- name: "language_detection"
type: "language_detection"
Expand Down Expand Up @@ -62,6 +66,31 @@ rules:
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"
Expand Down
1 change: 1 addition & 0 deletions lib/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ type Config struct {
Url string `mapstructure:"url,omitempty"`
ApiKey string `mapstructure:"api_key,omitempty"`
PIIService interface{} `mapstructure:"piiservice,omitempty"`
Categories []string `mapstructure:"categories,omitempty"`
}

// Add this function to set default values
Expand Down
135 changes: 0 additions & 135 deletions lib/llamaguard/handlers.go

This file was deleted.

103 changes: 0 additions & 103 deletions lib/promptguard/handlers.go

This file was deleted.

Loading

0 comments on commit 33a7627

Please sign in to comment.