Sasidhar commited on
Commit
40383ad
·
verified ·
1 Parent(s): 34eae06

Rename config.py to models.py

Browse files
Files changed (2) hide show
  1. config.py +0 -0
  2. models.py +13 -0
config.py DELETED
File without changes
models.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class GuardrailsConfig(BaseModel):
2
+ factual_consistency: bool = True
3
+ toxicity: bool = True
4
+ # Extend with more flags for additional guardrails
5
+
6
+ # Request model now includes both the response and the configuration.
7
+ class CheckRequest(BaseModel):
8
+ response: str
9
+ config: GuardrailsConfig = GuardrailsConfig() # Default config if not provided
10
+
11
+ class CheckResponse(BaseModel):
12
+ grounded: bool
13
+ details: dict