generateId

Generate an id in the SDK default format.

Produces the same id format the SDK uses internally for messages and tool calls. Use it so ids you mint by hand match the ones the loop generates.

let id = generateId()

Signature

func generateId(
    size: Int = 16
) -> String

Defined in Sources/AI/Core/RuntimeContext.swift.

Parameters

ParameterTypeDefault
sizeInt16

Returns

A String.

See also