Skip to content

AIDK API Reference / aidk-client / createMessage

Function: createMessage() ​

ts
function createMessage(
   role: MessageRoles, 
   content: 
  | string
  | ContentBlock[], 
   metadata?: Record<string, unknown>): Message;

Defined in: packages/client/src/execution-handler.ts:33

Create a Message object with generated ID and timestamp

Parameters ​

ParameterType
roleMessageRoles
content| string | ContentBlock[]
metadata?Record<string, unknown>

Returns ​

Message

Released under the MIT License.