VercelMessageAdapter
Defined in: .build/typescript/packages/core/src/memory/adapter/vercel.ts:23
Utility class for converting between LlamaIndex ChatMessage and Vercel UI Message formats
Type Parameters
Section titled “Type Parameters”AdditionalMessageOptions
Section titled “AdditionalMessageOptions”AdditionalMessageOptions extends object = object
Implements
Section titled “Implements”MessageAdapter<VercelMessage,AdditionalMessageOptions>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new VercelMessageAdapter<
AdditionalMessageOptions>():VercelMessageAdapter<AdditionalMessageOptions>
Returns
Section titled “Returns”VercelMessageAdapter<AdditionalMessageOptions>
Methods
Section titled “Methods”fromMemory()
Section titled “fromMemory()”fromMemory(
memoryMessage):VercelMessage
Defined in: .build/typescript/packages/core/src/memory/adapter/vercel.ts:30
Convert LlamaIndex ChatMessage to Vercel UI Message format
Parameters
Section titled “Parameters”memoryMessage
Section titled “memoryMessage”MemoryMessage<object>
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”toMemory()
Section titled “toMemory()”toMemory(
uiMessage):MemoryMessage<AdditionalMessageOptions>
Defined in: .build/typescript/packages/core/src/memory/adapter/vercel.ts:65
Convert Vercel UI Message to LlamaIndex ChatMessage format
Parameters
Section titled “Parameters”uiMessage
Section titled “uiMessage”Returns
Section titled “Returns”MemoryMessage<AdditionalMessageOptions>
Implementation of
Section titled “Implementation of”isCompatible()
Section titled “isCompatible()”isCompatible(
message):message is VercelMessage
Defined in: .build/typescript/packages/core/src/memory/adapter/vercel.ts:96
Validate if object matches VercelMessage structure
Parameters
Section titled “Parameters”message
Section titled “message”unknown
Returns
Section titled “Returns”message is VercelMessage