Skip to content

Update ttt.py #75

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

Open
wants to merge 1 commit into
base: base-sha/25f72ca7e3f85b69d4ef70075cdbac21f3f5f4c1
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion ttt.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def main():
# Just "you" and nothing else.
# So if the transcript is just "you", don't bother sending the notification,
# we will just delete the files and keep going to the next call.
if calljson["text"] != "you":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (code_refinement): Consider handling other whitespace variations in the condition.

Using strip() improves the condition by handling cases where the text might have leading or trailing spaces. However, consider if there are scenarios where other whitespace characters (like tabs or newlines) could appear and whether strip() adequately addresses these cases.

Suggested change
if calljson["text"] != "you":
if calljson["text"].strip() != "you":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment helpful?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment type correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment area correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What type of LLM test could this comment become?

  • 👍 - this comment is really good/important and we should always make it
  • 👎 - this comment is really bad and we should never make it
  • no reaction - don't turn this comment into an LLM test

if calljson["text"].strip() != "you":
send_notifications(calljson, audiofile, destinations)

# And now delete the files from the transcribe directory
Expand Down