from

fun from(type: String, payload: Map<String, Any?>, position: Int = 0): AIMessagePart?

Decodes one attachment, or returns null when it is not an AI step.

Parameters

type

The attachment type.

payload

The attachment payload.

position

The attachment's index, used as the identity of a step that carries no ID of its own.