Skip to content

Function: formatMessageHistoryAsTranscript()

Makaio Framework


Makaio Framework / ai-adapters-core / formatMessageHistoryAsTranscript

Function: formatMessageHistoryAsTranscript()

Section titled “Function: formatMessageHistoryAsTranscript()”

formatMessageHistoryAsTranscript(history): string

Defined in: ../../../adapters/core/src/utils/formatMessageHistoryAsTranscript.ts:45

Formats message history as a human-readable conversation transcript.

Converts structured Message[] into plain text format:

User: Hello, my name is Alice
Assistant: Nice to meet you, Alice!

This avoids exposing JSON structure to the LLM, which can trigger meta-analysis of the format rather than natural conversation continuation.

object[]

Array of Message objects with role and blocks

string

Human-readable transcript string