fix Dialogs is null
This commit is contained in:
parent
06491b1a28
commit
88539fbbb5
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue