Appearance
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
| Parameter | Type |
|---|---|
content | ChildBlock[] |
Returns
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
| Parameter | Type |
|---|---|
options | MessageBlockProps |
content | ChildBlock[] |
Returns
Example
ts
Message({from: 'assistant'}, [
MessageBody({content: 'Here is your answer.'}),
MessageActions({items: [{value: 'copy', icon: 'copy'}]}),
]);