AliceRolan commited on
Commit
2ae0414
·
verified ·
1 Parent(s): 6769111

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -194,10 +194,10 @@ guard = Guard().use(CustomPIIDetector).use(CustomProfanityDetector).use(CustomRe
194
 
195
  # Define Chatbot Function
196
  def chat_with_rag(message, history):
197
- try:
198
- res = guard.validate(message)
199
- except Exception as e:
200
- return f"❌ Guardrail {str(e)}"
201
  try:
202
  response = conversation_chain.invoke(message)
203
  confidence_score = get_confidence_score(message)
 
194
 
195
  # Define Chatbot Function
196
  def chat_with_rag(message, history):
197
+ # try:
198
+ # res = guard.validate(message)
199
+ # except Exception as e:
200
+ # return f"❌ Guardrail {str(e)}"
201
  try:
202
  response = conversation_chain.invoke(message)
203
  confidence_score = get_confidence_score(message)