One Logo Pool Ball
FoundationModels · IOS API REFERENCE

LanguageModelSession.Profile

struct · iOS 27.0+ · SDK 27.1

struct Profile

A profile that contains dynamic instructions. A profile binds ``DynamicInstructions`` to a set of session-level configuration values. The ``DynamicInstructions`` describes the content and tools and a ``DynamicProfile`` orchestrates transitions betwen session configurations. ```swift Profile { // Custom instructions and tools for a creative task. } // Use a higher creative temperature value when a person likes poetry. .temperature(likesPoetry ? 0.8 : 0.1) // Perform deeper reasoning when a person likes astronomy. .reasoningLevel(likesAstronomy ? .deep : .light) ``` A ``Profile`` conforms to ``DynamicProfile`` and includes all the same modifiers that you use to configure a unit of work to perform. Observe and react to key moments during a session by using life cycle modifiers. When a profile and a subprofile both register a callback, the framework calls both. The following shows observing ``DynamicProfile/onToolOutput(perform:)`` to handle logging after a tool provides output: ```swift Profile { // Custom instructions and tools for the task. } .onToolOutput { toolCall, output in // Runs after the tool to log any necessary activity. } ```

Members (1)

get · iOS 27.0+

body

TypeScript
get body(): never
Swift declaration
var body: Never { get }

The content of the dynamic profile.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

LanguageModelSession.Profile.init(_:)

This protocol needs associated types that cannot yet cross the bridge.

All FoundationModels types →