macOS / SwiftUI / Core AI
CoreAIChat
CoreAIChat demonstrates a local macOS chat app backed by an exported Core AI language model. It combines SwiftUI, Core AI language model resources, and Foundation Models sessions into a compact proof of concept.
Purpose
What it is for
The project is meant as a hands-on reference for running a converted language model locally in a macOS app. It focuses on the setup path from model export to Xcode integration, then on the smallest app loop needed to load the model and generate a response.
Behavior
What it does
Implementation
How it is built
The exported model directory is added to Xcode as a resource folder.
The expected model package contains an .aimodel bundle, metadata.json, and tokenizer assets.
Runtime code resolves the bundled model URL, initializes CoreAILanguageModel, creates a Foundation Models session, and sends prompts through that session.
The implementation is intentionally minimal so the model packaging and loading flow stays easy to inspect.