One Logo Pool Ball
FoundationModels · IOS API REFERENCE

LanguageModelExecutorGenerationChannel.TextFragment

struct · iOS 27.0+ · SDK 27.1

struct TextFragment

Text appended to a streaming entry's current text segment. Use this type when appending text with ``Response`` and ``Reasoning`` actions.

Members (6)

get · iOS 27.0+

tokenCount

TypeScript
get tokenCount(): number
Swift declaration
var tokenCount: Int
set · iOS 27.0+

tokenCount

TypeScript
set tokenCount(value: number)
Swift declaration
var tokenCount: Int
get · iOS 27.0+

content

TypeScript
get content(): string
Swift declaration
var content: String
set · iOS 27.0+

content

TypeScript
set content(value: string)
Swift declaration
var content: String
get · iOS 27.0+

segmentID

TypeScript
get segmentID(): (string) | null
Swift declaration
var segmentID: String?
set · iOS 27.0+

segmentID

TypeScript
set segmentID(value: (string) | null)
Swift declaration
var segmentID: String?

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →