Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move New providers to ruleserver #255

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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