From 9c920fbc53b15f7759a04021391f69d8d5082be2 Mon Sep 17 00:00:00 2001 From: chandler05 <66492208+chandler05@users.noreply.github.com> Date: Mon, 11 Mar 2024 03:55:22 -0500 Subject: [PATCH] MultiServer: Improve command response to help troubleshooting (#2833) * Update MultiServer.py * Improve logging again * Add to other log as well * Update MultiServer.py --- MultiServer.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index c2d8e4ad..c374d6d7 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1052,17 +1052,19 @@ def get_intended_text(input_text: str, possible_answers) -> typing.Tuple[str, bo if picks[0][1] == 100: return picks[0][0], True, "Perfect Match" elif picks[0][1] < 75: - return picks[0][0], False, f"Didn't find something that closely matches, " \ - f"did you mean {picks[0][0]}? ({picks[0][1]}% sure)" + return picks[0][0], False, f"Didn't find something that closely matches '{input_text}', " \ + f"did you mean '{picks[0][0]}'? ({picks[0][1]}% sure)" elif dif > 5: return picks[0][0], True, "Close Match" else: - return picks[0][0], False, f"Too many close matches, did you mean {picks[0][0]}? ({picks[0][1]}% sure)" + return picks[0][0], False, f"Too many close matches for '{input_text}', " \ + f"did you mean '{picks[0][0]}'? ({picks[0][1]}% sure)" else: if picks[0][1] > 90: return picks[0][0], True, "Only Option Match" else: - return picks[0][0], False, f"Did you mean {picks[0][0]}? ({picks[0][1]}% sure)" + return picks[0][0], False, f"Didn't find something that closely matches '{input_text}', " \ + f"did you mean '{picks[0][0]}'? ({picks[0][1]}% sure)" class CommandMeta(type):