One Logo Pool Ball
FoundationModels · IOS API REFERENCE

LanguageModelExecutorGenerationChannel.TextSegmentReplacement

struct · iOS 27.0+ · SDK 27.1

struct TextSegmentReplacement

A replacement for a streaming entry's current text segment. The `tokenCount` is the producer's count of tokens carried by `content` and is used by safety or usage accounting to credit the replacement against

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 →