mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 08:43:02 +08:00
fix(communication): rolling out all chat messages on auto triggered and raise dialog rolling trigger length limit
This commit is contained in:
@@ -41,7 +41,8 @@ public class DialogRolling extends AbstractAgentModule.Running<PartnerRunningFlo
|
|||||||
private static final String AUTO_UPDATE_CRON = "0/10 * * * * ?";
|
private static final String AUTO_UPDATE_CRON = "0/10 * * * * ?";
|
||||||
private static final long UPDATE_TRIGGER_INTERVAL = 60 * 60 * 1000;
|
private static final long UPDATE_TRIGGER_INTERVAL = 60 * 60 * 1000;
|
||||||
private static final int CONTEXT_RETAIN_DIVISOR = 6;
|
private static final int CONTEXT_RETAIN_DIVISOR = 6;
|
||||||
private static final int DIALOG_ROLLING_TRIGGER_LIMIT = 36;
|
private static final int FULL_ROLLING_RETAIN_DIVISOR = Integer.MAX_VALUE;
|
||||||
|
private static final int DIALOG_ROLLING_TRIGGER_LIMIT = 72;
|
||||||
|
|
||||||
private final AtomicBoolean rolling = new AtomicBoolean(false);
|
private final AtomicBoolean rolling = new AtomicBoolean(false);
|
||||||
|
|
||||||
@@ -119,7 +120,8 @@ public class DialogRolling extends AbstractAgentModule.Running<PartnerRunningFlo
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RollingResult result = buildRollingResult(chatIncrement, fullChatSnapshot.size(), CONTEXT_RETAIN_DIVISOR);
|
int retainDivisor = refreshMemoryId ? FULL_ROLLING_RETAIN_DIVISOR : CONTEXT_RETAIN_DIVISOR;
|
||||||
|
RollingResult result = buildRollingResult(chatIncrement, fullChatSnapshot.size(), retainDivisor);
|
||||||
applyRolling(result);
|
applyRolling(result);
|
||||||
afterRollingRegistry.trigger(result);
|
afterRollingRegistry.trigger(result);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user