iOS reference / Speech / SFCustomLanguageModelData.TemplateInsertableBuilderSpeech · IOS API REFERENCE
SFCustomLanguageModelData.TemplateInsertableBuilder struct · iOS 17.0+ · SDK 27.1
@resultBuilder struct TemplateInsertableBuilderA custom parameter attribute that constructs custom language model data from closures.
Phrase counts can be generated manually by providing an exact phrase and weight (e.g. "Play the Albin counter gambit") or
from templates (e.g. "Move my \<piece> to \<square>"). Templates themselves can be constructed manually, or using
the result builder DSL. This type supports the latter.
Members (4) static · iOS 17.0+ buildArray TypeScript static buildArray(components: Array<Implements<TemplateInsertable> | SDKHandle>): SDKHandleSwift declaration static func buildArray(_ components: [any TemplateInsertable]) -> any TemplateInsertableEnables support for `for..in` loops.
static · iOS 17.0+ buildEither TypeScript static buildEitherFirst(first: Implements<TemplateInsertable> | SDKHandle): SDKHandleSwift declaration static func buildEither(first: any TemplateInsertable) -> any TemplateInsertableEnables support for `if-else` and `switch` constructs.
static · iOS 17.0+ buildEither TypeScript static buildEitherSecond(second: Implements<TemplateInsertable> | SDKHandle): SDKHandleSwift declaration static func buildEither(second: any TemplateInsertable) -> any TemplateInsertableEnables support for `if-else` and `switch` constructs.
static · iOS 17.0+ buildOptional TypeScript static buildOptional(component?: (Implements<TemplateInsertable> | SDKHandle) | null): SDKHandleSwift declaration static func buildOptional(_ component: (any TemplateInsertable)?) -> any TemplateInsertableEnables support for `if` statements that do not have an `else` clause.
Skipped declarations 1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SFCustomLanguageModelData.TemplateInsertableBuilder.buildBlock(_:)
A variable number of Swift arguments is not supported.
All Speech types →