prajna-soni commited on
Commit
9343018
·
verified ·
1 Parent(s): 89a69e3

Update app.py to fix mistral moderation passing to metadata

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -84,7 +84,7 @@ async def check_safety(message: str, metadata: dict) -> dict:
84
  # Mistral moderation results
85
  try:
86
  mistral_response = await get_mistral_moderation(user_content, message)
87
- mistral_results = mistral_response.results
88
  except Exception as e:
89
  print(f"[Mistral moderation error]: {str(e)}")
90
  mistral_results = None
 
84
  # Mistral moderation results
85
  try:
86
  mistral_response = await get_mistral_moderation(user_content, message)
87
+ mistral_results = mistral_response
88
  except Exception as e:
89
  print(f"[Mistral moderation error]: {str(e)}")
90
  mistral_results = None