An open API service indexing awesome lists of open source software.

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

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/)
![ChatBot Demo](./Demos/chatBot.gif)

### 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/)
![GrammarCorrection Demo](./Demos/grammarCorrection.gif)

### 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/)
![RecipeGenerator Demo](./Demos/recipeGenerator.gif)

### 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/)
![WorkoutGuide Demo](./Demos/workoutGuide.gif)

### 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/)
![CozyTales Demo](./Demos/cozyTales.gif)

### 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/)
![WeatherOutfitAdvisor Demo](./Demos/weatherOutfitAdvisor.gif)

---

## ๐Ÿ’ก 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.

---