Skip to content

Function: Message()

Call Signature

ts
function Message(content: ChildBlock[]): Block;

Defined in: src/renderer/blocks/index.ts:1998

Experimental

Message — a single chat message in a Conversation. Aligns right for from: 'user' and left otherwise. Drop a MessageBody, Response, CodeBlock, Sources, … inside.

Parameters

ParameterType
contentChildBlock[]

Returns

Block

Example

ts
Message({from: 'assistant'}, [
  MessageBody({content: 'Here is your answer.'}),
  MessageActions({items: [{value: 'copy', icon: 'copy'}]}),
]);

Call Signature

ts
function Message(options: MessageBlockProps, content: ChildBlock[]): Block;

Defined in: src/renderer/blocks/index.ts:1999

Experimental

Message — a single chat message in a Conversation. Aligns right for from: 'user' and left otherwise. Drop a MessageBody, Response, CodeBlock, Sources, … inside.

Parameters

ParameterType
optionsMessageBlockProps
contentChildBlock[]

Returns

Block

Example

ts
Message({from: 'assistant'}, [
  MessageBody({content: 'Here is your answer.'}),
  MessageActions({items: [{value: 'copy', icon: 'copy'}]}),
]);

Matterway Assistant SDK Documentation