Merge pull request #988 from hchen2020/master

fix Dialogs is null
This commit is contained in:
Haiping 2025-04-02 17:05:24 -05:00 committed by GitHub
commit 31d91ab297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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();