Thanks for reaching out! To clarify, Foundation Models framework is currently not available in Swift Playgrounds, which you get if you do Xcode > File > New > Playground... Overall Swift Playgrounds only support a subset of the SDK. Foundation Models is supported in Xcode inline Playgrounds though, so if you do: import Playgrounds import FoundationModels @Generable struct Specifications { @Guide(description: Search for color) var color: String } #Playground { let session = LanguageModelSession() let response = try await session.respond( to: Help me search for orange, generating: Specifications.self ) } This should work.
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Tags: