import type { AssistantMessageResponsePayload } from "../types/assistant"; import { runAssistantAddressLaneResponseRuntime, type RunAssistantAddressLaneResponseRuntimeInput, type RunAssistantAddressLaneResponseRuntimeOutput } from "./assistantAddressLaneResponseRuntimeAdapter"; import { buildAssistantAddressLaneResponseRuntimeInput } from "./assistantAddressLaneResponseRuntimeInputBuilder"; export interface RunAssistantAddressLaneResponseAttemptRuntimeInput< ResponseType = AssistantMessageResponsePayload > extends RunAssistantAddressLaneResponseRuntimeInput { runAddressLaneResponseRuntime?: ( input: RunAssistantAddressLaneResponseRuntimeInput ) => RunAssistantAddressLaneResponseRuntimeOutput; } export function runAssistantAddressLaneResponseAttemptRuntime< ResponseType = AssistantMessageResponsePayload >( input: RunAssistantAddressLaneResponseAttemptRuntimeInput ): ResponseType { const runAddressLaneResponseRuntimeSafe = input.runAddressLaneResponseRuntime ?? runAssistantAddressLaneResponseRuntime; const runtime = runAddressLaneResponseRuntimeSafe( buildAssistantAddressLaneResponseRuntimeInput({ sessionId: input.sessionId, userMessage: input.userMessage, effectiveAddressUserMessage: input.effectiveAddressUserMessage, addressLane: input.addressLane, carryoverMeta: input.carryoverMeta, llmPreDecomposeMeta: input.llmPreDecomposeMeta, knownOrganizations: input.knownOrganizations, activeOrganization: input.activeOrganization, sanitizeOutgoingAssistantText: input.sanitizeOutgoingAssistantText, buildAddressDebugPayload: input.buildAddressDebugPayload, buildAddressFollowupOffer: input.buildAddressFollowupOffer, mergeKnownOrganizations: input.mergeKnownOrganizations, toNonEmptyString: input.toNonEmptyString, appendItem: input.appendItem, getSession: input.getSession, persistSession: input.persistSession, cloneConversation: input.cloneConversation, logEvent: input.logEvent, messageIdFactory: input.messageIdFactory }) ); return runtime.response; }