Generable
public func asPartiallyGenerated() -> Self.PartiallyGenerated
GenerationGuide
public static func anyOf(_ values: [Swift.String]) -> FoundationModels.GenerationGuide<Swift.String>
GenerationGuide
public static func constant(_ value: Swift.String) -> FoundationModels.GenerationGuide<Swift.String>
GenerationGuide
public static func count<Element>(_ range: Swift.ClosedRange<Swift.Int>) -> FoundationModels.GenerationGuide<[Element]> where Value == [Element]
GenerationGuide
public static func count<Element>(_ count: Swift.Int) -> FoundationModels.GenerationGuide<[Element]> where Value == [Element]
GenerationGuide
@_documentation(visibility: private) public static func count(_ range: Swift.ClosedRange<Swift.Int>) -> FoundationModels.GenerationGuide<Value>
GenerationGuide
@_documentation(visibility: private) @_disfavoredOverload public static func count(_ count: Swift.Int) -> FoundationModels.GenerationGuide<Value>
GenerationGuide
public static func element<Element>(_ guide: FoundationModels.GenerationGuide<Element>) -> FoundationModels.GenerationGuide<[Element]> where Value == [Element]
GenerationGuide
public static func maximum(_ value: Swift.Int) -> FoundationModels.GenerationGuide<Swift.Int>
GenerationGuide
public static func maximum(_ value: Swift.Float) -> FoundationModels.GenerationGuide<Swift.Float>
GenerationGuide
public static func maximum(_ value: Foundation.Decimal) -> FoundationModels.GenerationGuide<Foundation.Decimal>
GenerationGuide
public static func maximum(_ value: Swift.Double) -> FoundationModels.GenerationGuide<Swift.Double>
GenerationGuide
public static func maximumCount<Element>(_ count: Swift.Int) -> FoundationModels.GenerationGuide<[Element]> where Value == [Element]
GenerationGuide
@_documentation(visibility: private) public static func maximumCount(_ count: Swift.Int) -> FoundationModels.GenerationGuide<Value>
GenerationGuide
public static func minimum(_ value: Swift.Int) -> FoundationModels.GenerationGuide<Swift.Int>
GenerationGuide
public static func minimum(_ value: Swift.Float) -> FoundationModels.GenerationGuide<Swift.Float>
GenerationGuide
public static func minimum(_ value: Foundation.Decimal) -> FoundationModels.GenerationGuide<Foundation.Decimal>
GenerationGuide
public static func minimum(_ value: Swift.Double) -> FoundationModels.GenerationGuide<Swift.Double>
GenerationGuide
public static func minimumCount<Element>(_ count: Swift.Int) -> FoundationModels.GenerationGuide<[Element]> where Value == [Element]
GenerationGuide
@_documentation(visibility: private) public static func minimumCount(_ count: Swift.Int) -> FoundationModels.GenerationGuide<Value>
GenerationGuide
public static func pattern<Output>(_ regex: _StringProcessing.Regex<Output>) -> FoundationModels.GenerationGuide<Swift.String>
GenerationGuide
public static func range(_ range: Swift.ClosedRange<Swift.Int>) -> FoundationModels.GenerationGuide<Swift.Int>
GenerationGuide
public static func range(_ range: Swift.ClosedRange<Swift.Float>) -> FoundationModels.GenerationGuide<Swift.Float>
GenerationGuide
public static func range(_ range: Swift.ClosedRange<Foundation.Decimal>) -> FoundationModels.GenerationGuide<Foundation.Decimal>
GenerationGuide
public static func range(_ range: Swift.ClosedRange<Swift.Double>) -> FoundationModels.GenerationGuide<Swift.Double>
LanguageModelSession.ResponseStream
nonisolated(nonsending) public func collect() async throws -> sending FoundationModels.LanguageModelSession.Response<Content>
LanguageModelSession.ResponseStream
nonisolated(nonsending) public func collect() async throws -> FoundationModels.LanguageModelSession.Response<Content>
LanguageModelSession.ResponseStream
public func makeAsyncIterator() -> FoundationModels.LanguageModelSession.ResponseStream<Content>.AsyncIterator
LanguageModelSession
@discardableResult
final public func logFeedbackAttachment(sentiment: FoundationModels.LanguageModelFeedback.Sentiment?, issues: [FoundationModels.LanguageModelFeedback.Issue] = [], desiredOutput: FoundationModels.Transcript.Entry? = nil) -> Foundation.Data
LanguageModelSession
@backDeployed(before: iOS 26.1, macOS 26.1, visionOS 26.1)
@discardableResult
final public func logFeedbackAttachment(sentiment: FoundationModels.LanguageModelFeedback.Sentiment?, issues: [FoundationModels.LanguageModelFeedback.Issue] = [], desiredResponseText: Swift.String?) -> Foundation.Data
LanguageModelSession
@backDeployed(before: iOS 26.1, macOS 26.1, visionOS 26.1)
@discardableResult
final public func logFeedbackAttachment(sentiment: FoundationModels.LanguageModelFeedback.Sentiment?, issues: [FoundationModels.LanguageModelFeedback.Issue] = [], desiredResponseContent: (any FoundationModels.ConvertibleToGeneratedContent)?) -> Foundation.Data
LanguageModelSession
@_disfavoredOverload final public func streamResponse(to prompt: Swift.String, schema: FoundationModels.GenerationSchema, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions()) -> sending FoundationModels.LanguageModelSession.ResponseStream<FoundationModels.GeneratedContent>
LanguageModelSession
@_disfavoredOverload final public func streamResponse(to prompt: Swift.String, schema: FoundationModels.GenerationSchema, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions()) -> FoundationModels.LanguageModelSession.ResponseStream<FoundationModels.GeneratedContent>
LanguageModelSession
final public func streamResponse(schema: FoundationModels.GenerationSchema, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions(), @FoundationModels.PromptBuilder prompt: () throws -> FoundationModels.Prompt) rethrows -> sending FoundationModels.LanguageModelSession.ResponseStream<FoundationModels.GeneratedContent>
LanguageModelSession
final public func streamResponse(schema: FoundationModels.GenerationSchema, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions(), @FoundationModels.PromptBuilder prompt: () throws -> FoundationModels.Prompt) rethrows -> FoundationModels.LanguageModelSession.ResponseStream<FoundationModels.GeneratedContent>
LanguageModelSession
final public func streamResponse<Content>(to prompt: FoundationModels.Prompt, generating type: Content.Type = Content.self, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions()) -> sending FoundationModels.LanguageModelSession.ResponseStream<Content> where Content : FoundationModels.Generable
LanguageModelSession
final public func streamResponse<Content>(to prompt: FoundationModels.Prompt, generating type: Content.Type = Content.self, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions()) -> FoundationModels.LanguageModelSession.ResponseStream<Content> where Content : FoundationModels.Generable
LanguageModelSession
@_disfavoredOverload final public func streamResponse<Content>(to prompt: Swift.String, generating type: Content.Type = Content.self, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions()) -> sending FoundationModels.LanguageModelSession.ResponseStream<Content> where Content : FoundationModels.Generable
LanguageModelSession
@_disfavoredOverload final public func streamResponse<Content>(to prompt: Swift.String, generating type: Content.Type = Content.self, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions()) -> FoundationModels.LanguageModelSession.ResponseStream<Content> where Content : FoundationModels.Generable
LanguageModelSession
final public func streamResponse<Content>(generating type: Content.Type = Content.self, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions(), @FoundationModels.PromptBuilder prompt: () throws -> FoundationModels.Prompt) rethrows -> sending FoundationModels.LanguageModelSession.ResponseStream<Content> where Content : FoundationModels.Generable
LanguageModelSession
final public func streamResponse<Content>(generating type: Content.Type = Content.self, includeSchemaInPrompt: Swift.Bool = true, options: FoundationModels.GenerationOptions = GenerationOptions(), @FoundationModels.PromptBuilder prompt: () throws -> FoundationModels.Prompt) rethrows -> FoundationModels.LanguageModelSession.ResponseStream<Content> where Content : FoundationModels.Generable
LanguageModelSession
final public func streamResponse(to prompt: FoundationModels.Prompt, options: FoundationModels.GenerationOptions = GenerationOptions()) -> sending FoundationModels.LanguageModelSession.ResponseStream<Swift.String>
LanguageModelSession
final public func streamResponse(to prompt: FoundationModels.Prompt, options: FoundationModels.GenerationOptions = GenerationOptions()) -> FoundationModels.LanguageModelSession.ResponseStream<Swift.String>
LanguageModelSession
@_disfavoredOverload final public func streamResponse(to prompt: Swift.String, options: FoundationModels.GenerationOptions = GenerationOptions()) -> sending FoundationModels.LanguageModelSession.ResponseStream<Swift.String>
LanguageModelSession
@_disfavoredOverload final public func streamResponse(to prompt: Swift.String, options: FoundationModels.GenerationOptions = GenerationOptions()) -> FoundationModels.LanguageModelSession.ResponseStream<Swift.String>
LanguageModelSession
final public func streamResponse(options: FoundationModels.GenerationOptions = GenerationOptions(), @FoundationModels.PromptBuilder prompt: () throws -> FoundationModels.Prompt) rethrows -> sending FoundationModels.LanguageModelSession.ResponseStream<Swift.String>
LanguageModelSession
final public func streamResponse(options: FoundationModels.GenerationOptions = GenerationOptions(), @FoundationModels.PromptBuilder prompt: () throws -> FoundationModels.Prompt) rethrows -> FoundationModels.LanguageModelSession.ResponseStream<Swift.String>
SystemLanguageModel.Adapter
public static func compatibleAdapterIdentifiers(name: Swift.String) -> [Swift.String]
SystemLanguageModel.Adapter
public func compile() async throws
SystemLanguageModel.Adapter
public static func isCompatible(_ assetPack: BackgroundAssets.AssetPack) -> Swift.Bool
SystemLanguageModel.Adapter
public static func removeObsoleteAdapters() throws
SystemLanguageModel
final public func supportsLocale(_ locale: Foundation.Locale = Locale.current) -> Swift.Bool
Transcript
public func encode(to encoder: any Swift.Encoder) throws
ConvertibleToGeneratedContent
public var instructionsRepresentation: FoundationModels.Instructions
ConvertibleToGeneratedContent
public var promptRepresentation: FoundationModels.Prompt
Foundation.Decimal
public var generatedContent: FoundationModels.GeneratedContent
Foundation.Decimal
public static var generationSchema: FoundationModels.GenerationSchema
GeneratedContent
public var kind: FoundationModels.GeneratedContent.Kind
Instructions
public var instructionsRepresentation: FoundationModels.Instructions
Prompt
public var promptRepresentation: FoundationModels.Prompt
Swift.Array
public var generatedContent: FoundationModels.GeneratedContent
Swift.Array
public static var generationSchema: FoundationModels.GenerationSchema
Swift.Array
public var instructionsRepresentation: FoundationModels.Instructions
Swift.Array
public var promptRepresentation: FoundationModels.Prompt
Swift.Bool
public var generatedContent: FoundationModels.GeneratedContent
Swift.Bool
public static var generationSchema: FoundationModels.GenerationSchema
Swift.Double
public var generatedContent: FoundationModels.GeneratedContent
Swift.Double
public static var generationSchema: FoundationModels.GenerationSchema
Swift.Float
public var generatedContent: FoundationModels.GeneratedContent
Swift.Float
public static var generationSchema: FoundationModels.GenerationSchema
Swift.Int
public var generatedContent: FoundationModels.GeneratedContent
Swift.Int
public static var generationSchema: FoundationModels.GenerationSchema
Swift.Never
public var generatedContent: FoundationModels.GeneratedContent
Swift.Never
public static var generationSchema: FoundationModels.GenerationSchema
Swift.Optional
public var generatedContent: FoundationModels.GeneratedContent
Swift.String
public var generatedContent: FoundationModels.GeneratedContent
Swift.String
public static var generationSchema: FoundationModels.GenerationSchema
Swift.String
public var instructionsRepresentation: FoundationModels.Instructions
Swift.String
public var promptRepresentation: FoundationModels.Prompt
SystemLanguageModel
public static let `default`: FoundationModels.SystemLanguageModel
SystemLanguageModel
final public var supportedLanguages: Swift.Set<Foundation.Locale.Language>
Tool
public var includesSchemaInInstructions: Swift.Bool
Tool
public var name: Swift.String
Tool
public var parameters: FoundationModels.GenerationSchema
Transcript.Entry
public var description: Swift.String
Transcript.Instructions
public var description: Swift.String
Transcript.Prompt
public var description: Swift.String
Transcript.Response
public var description: Swift.String
Transcript.ResponseFormat
public var description: Swift.String
Transcript.Segment
public var description: Swift.String
Transcript.StructuredSegment
public var description: Swift.String
Transcript.TextSegment
public var description: Swift.String
Transcript.ToolCall
public var description: Swift.String
Transcript.ToolCalls
public var description: Swift.String
Transcript.ToolOutput
public var description: Swift.String
Foundation.Decimal
FoundationModels.Generable
Instructions
FoundationModels.InstructionsRepresentable
LanguageModelFeedback.Issue.Category
Swift.Equatable
LanguageModelFeedback.Issue.Category
Swift.Hashable
LanguageModelFeedback.Sentiment
Swift.Equatable
LanguageModelFeedback.Sentiment
Swift.Hashable
LanguageModelSession
@unchecked Swift.Sendable
LanguageModelSession.ResponseStream
_Concurrency.AsyncSequence
LanguageModelSession
nonisolated Observation.Observable
Prompt
FoundationModels.PromptRepresentable
Swift.Array
FoundationModels.ConvertibleFromGeneratedContent
Swift.Array
FoundationModels.ConvertibleToGeneratedContent
Swift.Array
FoundationModels.Generable
Swift.Array
FoundationModels.InstructionsRepresentable
Swift.Array
FoundationModels.PromptRepresentable
Swift.Bool
FoundationModels.Generable
Swift.Double
FoundationModels.Generable
Swift.Float
FoundationModels.Generable
Swift.Int
FoundationModels.Generable
Swift.Never
FoundationModels.Generable
Swift.Optional
FoundationModels.ConvertibleToGeneratedContent
Swift.Optional
FoundationModels.InstructionsRepresentable
Swift.Optional
FoundationModels.PromptRepresentable
Swift.String
FoundationModels.Generable
Swift.String
FoundationModels.InstructionsRepresentable
Swift.String
FoundationModels.PromptRepresentable
SystemLanguageModel.Availability.UnavailableReason
Swift.Hashable
SystemLanguageModel
nonisolated Observation.Observable
Transcript.Entry
Swift.CustomStringConvertible
Transcript.Instructions
Swift.CustomStringConvertible
Transcript.Prompt
Swift.CustomStringConvertible
Transcript.Response
Swift.CustomStringConvertible
Transcript.ResponseFormat
Swift.CustomStringConvertible
Transcript.Segment
Swift.CustomStringConvertible
Transcript.StructuredSegment
Swift.CustomStringConvertible
Transcript.TextSegment
Swift.CustomStringConvertible
Transcript.ToolCall
Swift.CustomStringConvertible
Transcript.ToolCalls
Swift.CustomStringConvertible
Transcript.ToolOutput
Swift.CustomStringConvertible
Foundation.Decimal
public init(_ content: FoundationModels.GeneratedContent) throws
GeneratedContent
public init(kind: FoundationModels.GeneratedContent.Kind, id: FoundationModels.GenerationID? = nil)
Instructions
public init(@FoundationModels.InstructionsBuilder _ content: () throws -> FoundationModels.Instructions) rethrows
Prompt
public init(@FoundationModels.PromptBuilder _ content: () throws -> FoundationModels.Prompt) rethrows
Swift.Array
public init(_ content: FoundationModels.GeneratedContent) throws
Swift.Bool
public init(_ content: FoundationModels.GeneratedContent) throws
Swift.Double
public init(_ content: FoundationModels.GeneratedContent) throws
Swift.Float
public init(_ content: FoundationModels.GeneratedContent) throws
Swift.Int
public init(_ content: FoundationModels.GeneratedContent) throws
Swift.Never
public init(_ content: FoundationModels.GeneratedContent) throws
Swift.String
public init(_ content: FoundationModels.GeneratedContent) throws
SystemLanguageModel.Adapter
public init(fileURL: Foundation.URL) throws
SystemLanguageModel.Adapter
public init(name: Swift.String) throws
SystemLanguageModel
convenience public init(useCase: FoundationModels.SystemLanguageModel.UseCase = .general, guardrails: FoundationModels.SystemLanguageModel.Guardrails = Guardrails.default)
SystemLanguageModel
convenience public init(adapter: FoundationModels.SystemLanguageModel.Adapter, guardrails: FoundationModels.SystemLanguageModel.Guardrails = .default)
Transcript
public init(from decoder: any Swift.Decoder) throws