From f72e0972ee679838344d30d4066d6175857b311d Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:31:30 +0100 Subject: [PATCH] removed debug stuff --- SecondBotEvents/Services/ChatGptService.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/SecondBotEvents/Services/ChatGptService.cs b/SecondBotEvents/Services/ChatGptService.cs index 5510b0c..34d266b 100644 --- a/SecondBotEvents/Services/ChatGptService.cs +++ b/SecondBotEvents/Services/ChatGptService.cs @@ -322,7 +322,6 @@ namespace SecondBotEvents.Services } try { - LogFormater.Debug(JsonConvert.SerializeObject(messages)); string replyMessage = ""; var openAiService = new OpenAIService(new OpenAiOptions() { @@ -363,7 +362,6 @@ namespace SecondBotEvents.Services }); } - LogFormater.Debug(JsonConvert.SerializeObject(completionResult)); if (completionResult == null) { return; @@ -415,15 +413,7 @@ namespace SecondBotEvents.Services } catch (Exception ex) { - // Handle other potential errors - // Get stack trace for the exception with source file information - var st = new StackTrace(ex, true); - // Get the top stack frame - var frame = st.GetFrame(0); - // Get the line number from the stack frame - var line = frame.GetFileLineNumber(); - LogFormater.Warn("An error occurred: " + ex.Message + " on line "+ line.ToString()); - LogFormater.Debug(ex.ToJson()); + LogFormater.Warn("An error occurred: " + ex.Message); } }