You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactors the chat response handling to streamline the retry logic and error handling.
Adds logging for chat response failures to improve debugging and monitoring.
{Outcome:OutcomeType.Failure,FinalException: not null}=>throwresult.FinalException,
127
-
{Outcome:OutcomeType.Failure,FinalException:null}whenstring.IsNullOrWhiteSpace(result.Result.Text)=>thrownewInvalidOperationException("Empty AI response."),
128
-
{Outcome:OutcomeType.Failure,FinalException:null}=>thrownewInvalidOperationException("Unexpected failure without an exception."),
129
-
_ =>result.Result,
130
-
};
131
123
}
132
124
133
125
publicasyncTaskHandleMentionAsync(
@@ -234,23 +226,14 @@ _ when _wordFilter.ContainsBannedWords(fullMessageToLlm) => "ты пидор, к
234
226
}
235
227
catch(Exceptione)
236
228
{
229
+
_logger.LogError(e,"Failed to get chat response for {Author}",author);
0 commit comments