Skip to content

Commit

Permalink
Replacing type() by isinstance() to be more PEP8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwaterdev committed Jul 9, 2024
1 parent 499aa97 commit be54911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lidya/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def listen_and_repeat(last_communication):
)

print("[*] Generating audio... ")
if type(llm_result) == dict and "message" in llm_result.keys():
if isinstance(llm_result, dict) and "message" in llm_result.keys():
tts.play_generate_audio(llm_result["message"])
else:
playsound('./lidya/ressources/sounds/fail_blip.mp3')
Expand Down

0 comments on commit be54911

Please sign in to comment.