https://github.com/desp0o/swift-foundationmodels
This is a personal playground experimenting with Apple's newly introduced FoundationModel framework. The goal is to explore the capabilities of LanguageModelSession.
https://github.com/desp0o/swift-foundationmodels
ai apple artificial-intelligence beta ios ios26 iosdevelopment large-language-models llm macos macos26 swiftui xcode xcode26
Last synced: 8 months ago
JSON representation
This is a personal playground experimenting with Apple's newly introduced FoundationModel framework. The goal is to explore the capabilities of LanguageModelSession.
- Host: GitHub
- URL: https://github.com/desp0o/swift-foundationmodels
- Owner: Desp0o
- Created: 2025-06-19T19:54:24.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-06-26T13:02:48.000Z (8 months ago)
- Last Synced: 2025-06-26T14:19:17.129Z (8 months ago)
- Topics: ai, apple, artificial-intelligence, beta, ios, ios26, iosdevelopment, large-language-models, llm, macos, macos26, swiftui, xcode, xcode26
- Language: Swift
- Homepage: https://youtube.com/shorts/6vQ-HgYl7XI?feature=share
- Size: 126 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Apple Foundation Model Playground
This is a personal playground experimenting with Apple's newly introduced **FoundationModel** framework. The goal is to explore the capabilities of `LanguageModelSession` and `@Generable` macros for generating structured and intelligent Swift data using Apple Intelligence.
## Features π
- **Chat with AI** using `LanguageModelSession` β simple conversational interaction with Apple Intelligence.
- **Generate Recipes** by passing selected ingredients to a custom `Recipe` structure using `@Generable`.
- **Generate Person Structs** using `@Generable` and `@Guide` macros β define constraints like age range or hobbies count.
## π§ Concepts
- `@Generable`: Automatically generate struct values using Apple Intelligence.
- `@Guide`: Provide field-level guidance for better, constraint-aware generation.
- `LanguageModelSession`: A session-based interface to interact with Appleβs large language model.
## π§ Tech Stack
- π§βπ» **SwiftUI**
- π οΈ **Xcode 26 Beta 2**
- π± **iOS 26 Beta 2**
- π» **macOS 26 Beta 2**
## Screenshots πΈ

## Demo π₯
[Watch the video](https://youtube.com/shorts/Ho4EoBIbaoE?feature=share)