One Logo Pool Ball
FoundationModels · IOS API REFERENCE

PrivateCloudComputeLanguageModel.Executor

struct · iOS 27.0+ · SDK 27.1

struct Executor

Members (3)

init · iOS 27.0+

init

TypeScript
static init(configuration: PrivateCloudComputeLanguageModel_Executor_Configuration): PrivateCloudComputeLanguageModel_Executor
Swift declaration
init(configuration: PrivateCloudComputeLanguageModel.Executor.Configuration)

Creates an executor from a configuration.

method · iOS 27.0+

prewarm

TypeScript
prewarm(model: PrivateCloudComputeLanguageModel, transcript: Transcript): void
Swift declaration
func prewarm(model: PrivateCloudComputeLanguageModel.Executor.Model, transcript: Transcript)

Loads assets into memory or pre-fills caches ahead of a request. - Note: The default implementation is a no-op.

method · iOS 27.0+

respond

TypeScript
respond(request: LanguageModelExecutorGenerationRequest, model: PrivateCloudComputeLanguageModel, channel: LanguageModelExecutorGenerationChannel): Promise<void>
Swift declaration
nonisolated(nonsending) func respond(to request: LanguageModelExecutorGenerationRequest, model: PrivateCloudComputeLanguageModel, streamingInto channel: LanguageModelExecutorGenerationChannel) async throws

Creates a response stream containing deltas. - Parameters: - request: The generation request. - model: The model instance for this request, providing live model state. - channel: A channel used to send events. - Note: If the model declares that it does not have a given capability via ``LanguageModel/capabilities``, then the system will automatically throw an error instead of invoking this method. You do not need to manually validate the request for any functionality captured by ``LanguageModelCapabilities``.

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →