LanguageModelSession.SessionProperty
A property wrapper that provides access to properties from within profiles, dynamic instructions, and tools.
Declaration
@propertyWrapper struct SessionProperty<Value>Mentioned in
Overview
Use this to access properties across a language model session, like to access the session history:
// Get a reference to the session history.
@SessionProperty(\.history)
var historyTo create a custom session property, use SessionPropertyEntry() to define a custom key that you access with LanguageModelSession.SessionProperty.