history
TypeScriptget history(): Transcript_HistoryViewSwift declarationfinal var history: Transcript.HistoryView { get set }The history portion of the session's transcript.
class · iOS 27.0+ · SDK 27.1
final class SessionPropertyValuesA container for property values. Use session property values across your session. To help manage the context window, access ``SessionPropertyValues/history`` to modify the transcript for the session: ```swift struct CompactingProfile: LanguageModelSession.DynamicProfile { @SessionProperty(\.history) var history var body: some LanguageModelSession.DynamicProfile { Profile { // Custom instructions and tools that you define. } .onResponse { _ in // Compact the history when the entries exceed a certain limit. if history.count > 100 { history = Array(history.suffix(50)) } } } } ``` Because updating the transcript history can cause cache invalidations for some models, carefully consider how you modify an existing transcript. For more information, see <doc:optimizing-key-value-caching-in-language-model-sessions>. Use ``SessionPropertyEntry()`` to create custom session properties.
get history(): Transcript_HistoryViewSwift declarationfinal var history: Transcript.HistoryView { get set }The history portion of the session's transcript.
set history(value: Transcript_HistoryView)Swift declarationfinal var history: Transcript.HistoryView { get set }The history portion of the session's transcript.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SessionPropertyValues.subscript(_:)
Passing a Swift type itself is not supported.