fix Dialogs is null

This commit is contained in:
Haiping Chen 2025-04-02 17:03:05 -05:00
parent 06491b1a28
commit 88539fbbb5

View file

@ -36,6 +36,11 @@ public class RateLimitConversationHook : ConversationHookBase
return;
}
if (Dialogs == null)
{
return;
}
// Check message sending frequency
var userSents = Dialogs.Where(x => x.Role == AgentRole.User)
.TakeLast(2).ToList();