https://github.com/kimhyeri/foundationmodelsplayground
A collection of examples using Appleโs FoundationModels framework
https://github.com/kimhyeri/foundationmodelsplayground
apple apple-ai apple-foundation-models apple-foundationmodels apple-llm apple-llm-examples apple-ondevice apple-ondevice-foundationmodels apple-ondevice-llm foundation-models foundationmodels llm on-device-ai swift swiftui
Last synced: about 1 month ago
JSON representation
A collection of examples using Appleโs FoundationModels framework
- Host: GitHub
- URL: https://github.com/kimhyeri/foundationmodelsplayground
- Owner: kimhyeri
- License: mit
- Created: 2025-07-22T13:42:56.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-03-11T01:58:14.000Z (3 months ago)
- Last Synced: 2026-03-11T07:40:59.054Z (3 months ago)
- Topics: apple, apple-ai, apple-foundation-models, apple-foundationmodels, apple-llm, apple-llm-examples, apple-ondevice, apple-ondevice-foundationmodels, apple-ondevice-llm, foundation-models, foundationmodels, llm, on-device-ai, swift, swiftui
- Language: Swift
- Homepage:
- Size: 928 KB
- Stars: 11
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FoundationModelsPlayground
A collection of on-device examples using Appleโs FoundationModels framework
---
## ๐งช Available Demos
### 1. ๐ฌ On-device Chatbot
A conversational chatbot that responds in a friendly tone.
> โ
Powered by `SystemLanguageModel`
> โ
Maintains short context history
> โ
Runs 100% locally on-device
[๐๏ธ ChatBot](./ChatBot/)

### 2. ๐ Grammar Correction
An English tutor that checks your sentence, explains grammar mistakes, and provides corrections.
> โ
Powered by `SystemLanguageModel`
> โ
Offers detailed explanations
> โ
Runs 100% locally on-device
[๐๏ธ GrammarCorrection](./GrammarCorrection/)

### 3. ๐ณ Recipe Generator
Creates cooking recipes with clear step-by-step instructions.
> โ
Powered by `SystemLanguageModel`
> โ
Supports streaming output for recipe generation
> โ
Produces structured results (title, ingredients, steps)
> โ
Runs 100% locally on-device
[๐๏ธ RecipeGenerator](./RecipeGenerator/)

### 4. ๐๏ธโโ๏ธ AI Workout Plan Generator
Generates personalized workout routines tailored to your goals, equipment, and experience level.
> โ
Powered by FoundationModels (on-device)
> โ
Fully customizable inputs (goal, duration, equipment, level)
> โ
Produces clear step-by-step exercise lists
> โ
Runs 100% locallyโno network required
[๐๏ธ WorkoutGuide](./WorkoutGuide/)

### 5. ๐ CozyTales โ Calm Storytelling for Children
An on-device storytelling app that generates calming, child-friendly stories in real timeโdesigned to help children relax in stressful situations such as flights, bedtime, or unfamiliar environments.
> โ
Powered by `SystemLanguageModel`
> โ
Generates safe, soothing stories entirely on-device
> โ
Adjustable story length (1โ12 minutes)
> โ
Real-time text-to-speech playback using `AVSpeechSynthesizer`
[๐๏ธ CozyTales](./CozyTales/)

### 6. ๐ค๏ธ Weather Outfit Advisor
An on-device assistant that checks the weather for a city and suggests what to wear based on the conditions.
> โ
Powered by `SystemLanguageModel`
> โ
Uses a custom `Tool` (`get_weather`) for weather lookup
> โ
Streams outfit advice in real time
> โ
Displays structured weather info (temperature, humidity, wind, condition)
> โ
Runs 100% locally on-device
[๐๏ธ WeatherOutfitAdvisor](./WeatherOutfitAdvisor/)

---
## ๐ก About FoundationModels
[FoundationModels](https://developer.apple.com/documentation/foundationmodels) is Appleโs official framework for running foundation language models on-device.
These examples help developers explore capabilities like text generation, summarization, and natural dialogue โ all without relying on cloud inference.
---