АРЧ - Ассистент: отделить meta-followup по прошлому ответу от повторного запуска address lane
This commit is contained in:
@@ -214,12 +214,32 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
|
||||
const debugActiveOrganization =
|
||||
input.toNonEmptyString(debugFilters?.organization) ??
|
||||
input.toNonEmptyString(input.activeOrganization);
|
||||
const followupContextSource =
|
||||
input.carryoverMeta?.followupContext && typeof input.carryoverMeta.followupContext === "object"
|
||||
? (input.carryoverMeta.followupContext as Record<string, unknown>)
|
||||
: null;
|
||||
if (debugKnownOrganizations.length > 0) {
|
||||
debug.assistant_known_organizations = debugKnownOrganizations;
|
||||
}
|
||||
if (debugActiveOrganization) {
|
||||
debug.assistant_active_organization = debugActiveOrganization;
|
||||
}
|
||||
const rootIntent = input.toNonEmptyString(followupContextSource?.root_intent);
|
||||
const currentFrameKind = input.toNonEmptyString(followupContextSource?.current_frame_kind);
|
||||
const rootFilters =
|
||||
followupContextSource?.root_filters && typeof followupContextSource.root_filters === "object"
|
||||
? (followupContextSource.root_filters as Record<string, unknown>)
|
||||
: null;
|
||||
if (rootIntent || currentFrameKind) {
|
||||
debug.address_root_frame_context = {
|
||||
root_intent: rootIntent,
|
||||
current_frame_kind: currentFrameKind,
|
||||
organization: input.toNonEmptyString(rootFilters?.organization),
|
||||
as_of_date: input.toNonEmptyString(rootFilters?.as_of_date),
|
||||
period_from: input.toNonEmptyString(rootFilters?.period_from),
|
||||
period_to: input.toNonEmptyString(rootFilters?.period_to)
|
||||
};
|
||||
}
|
||||
const finalization = finalizeAddressTurnSafe({
|
||||
sessionId: input.sessionId,
|
||||
userMessage: input.userMessage,
|
||||
|
||||
Reference in New Issue
Block a user