One Logo Pool Ball
FoundationModels · IOS API REFERENCE

LanguageModelExecutorGenerationChannel.Event

struct · iOS 27.0+ · SDK 27.1

struct Event

A generation event sent on a generation channel. Construct one with a leading-dot factory — ``response(entryID:action:)``, ``reasoning(entryID:action:)``, or ``toolCalls(entryID:action:)`` — and pass it to ``send(_:)``.

Members (3)

static · iOS 27.0+

response

TypeScript
static response(entryID: (string) | null, action: LanguageModelExecutorGenerationChannel_Response_Action): LanguageModelExecutorGenerationChannel_Event
Swift declaration
static func response(entryID: String? = nil, action: LanguageModelExecutorGenerationChannel.Response.Action) -> LanguageModelExecutorGenerationChannel.Event

A response event addressed to a transcript entry. - Parameters: - entryID: The response entry this event targets. Pass `nil` to let the framework coalesce consecutive response events into a single entry; pass an explicit id to anchor the event to a specific entry. - action: The operation to perform on the response entry.

static · iOS 27.0+

reasoning

TypeScript
static reasoning(entryID: (string) | null, action: LanguageModelExecutorGenerationChannel_Reasoning_Action): LanguageModelExecutorGenerationChannel_Event
Swift declaration
static func reasoning(entryID: String? = nil, action: LanguageModelExecutorGenerationChannel.Reasoning.Action) -> LanguageModelExecutorGenerationChannel.Event

A reasoning event addressed to a transcript entry. - Parameters: - entryID: The reasoning entry this event targets. Pass `nil` to coalesce consecutive reasoning deltas into the trailing reasoning entry; pass an explicit id when you need a stable anchor. - action: The operation to perform on the reasoning entry.

static · iOS 27.0+

toolCalls

TypeScript
static toolCalls(entryID: (string) | null, action: LanguageModelExecutorGenerationChannel_ToolCalls_Action): LanguageModelExecutorGenerationChannel_Event
Swift declaration
static func toolCalls(entryID: String? = nil, action: LanguageModelExecutorGenerationChannel.ToolCalls.Action) -> LanguageModelExecutorGenerationChannel.Event

A tool-calls event addressed to a transcript entry. - Parameters: - entryID: The tool-calls entry this event targets. Pass `nil` to let the framework coalesce consecutive tool-calls events into a single entry; pass an explicit id to anchor the event to a specific entry. - action: The operation to perform on the tool-calls entry.

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →