Skip to content

Commit

Permalink
ProfanityRemoerAgent: Move error message inside where it is being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-spext committed Oct 30, 2024
1 parent 0903dcb commit 6636990
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/director/agents/profanity_remover.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def run(
"""
try:
beep_audio_id = beep_audio_id or BEEP_AUDIO_ID
error_message = (
"Please provide the beep_audio_id, or set up BEEP_AUDIO_ID in the .env file located in the backend directory."
"Notify user this verbatum in summary as well since it isn't displayed to them: If you don’t have a beep sound ready, you can use the audio from https://www.youtube.com/watch?v=GvXbEO5Kbgc YouTube link. Upload it as audio, obtain the audio ID, and set it as BEEP_AUDIO_ID in your .env file.'"
"Remember to add above line in summary."
)
if not beep_audio_id:
error_message = (
"Please provide the beep_audio_id, or set up BEEP_AUDIO_ID in the .env file located in the backend directory."
"Notify user this verbatum in summary as well since it isn't displayed to them: If you don’t have a beep sound ready, you can use the audio from https://www.youtube.com/watch?v=GvXbEO5Kbgc YouTube link. Upload it as audio, obtain the audio ID, and set it as BEEP_AUDIO_ID in your .env file.'"
"Remember to add above line in summary."
)
return AgentResponse(
status=AgentStatus.ERROR,
message=error_message,
Expand Down

0 comments on commit 6636990

Please sign in to comment.