АРЧ АП11 - Добавить state transition owner для assistant runtime
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
type FinalizeAssistantAddressTurnInput
|
||||
} from "./assistantAddressTurnFinalizeRuntimeAdapter";
|
||||
import { attachAssistantRuntimeContractShadow } from "./assistantRuntimeContractResolver";
|
||||
import { attachAssistantStateTransition } from "./assistantStateTransitionRuntimeAdapter";
|
||||
import { attachAssistantTruthAnswerPolicy } from "./assistantTruthAnswerPolicyRuntimeAdapter";
|
||||
|
||||
export interface RunAssistantAddressLaneResponseRuntimeInput<ResponseType = AssistantMessageResponsePayload> {
|
||||
@@ -256,6 +257,10 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
|
||||
addressRuntimeMeta: input.llmPreDecomposeMeta,
|
||||
replyType: normalizeAddressReplyType(input.addressLane.reply_type)
|
||||
});
|
||||
const debugWithStateTransition = attachAssistantStateTransition(debugWithTruthAnswerPolicy, {
|
||||
addressRuntimeMeta: input.llmPreDecomposeMeta,
|
||||
replyType: normalizeAddressReplyType(input.addressLane.reply_type)
|
||||
});
|
||||
const finalization = finalizeAddressTurnSafe({
|
||||
sessionId: input.sessionId,
|
||||
userMessage: input.userMessage,
|
||||
@@ -263,7 +268,7 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
|
||||
assistantReply: safeAddressReply,
|
||||
replyType: normalizeAddressReplyType(input.addressLane.reply_type),
|
||||
addressLaneDebug: normalizeAddressLaneDebug(input.addressLane.debug),
|
||||
debug: debugWithTruthAnswerPolicy,
|
||||
debug: debugWithStateTransition,
|
||||
carryoverMeta: normalizeCarryoverMeta(input.carryoverMeta),
|
||||
llmPreDecomposeMeta: normalizeLlmPreDecomposeMeta(input.llmPreDecomposeMeta),
|
||||
appendItem: input.appendItem,
|
||||
@@ -276,6 +281,6 @@ export function runAssistantAddressLaneResponseRuntime<ResponseType = AssistantM
|
||||
|
||||
return {
|
||||
response: finalization.response as ResponseType,
|
||||
debug: debugWithTruthAnswerPolicy
|
||||
debug: debugWithStateTransition
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user