Foundation-Models-Framework-Example  by rudrankriyam

Foundation Models Framework examples for iOS and macOS

Created 8 months ago
929 stars

Top 39.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project offers a comprehensive set of example applications and playgrounds for Apple's Foundation Models (FMF) framework, targeting developers building AI-powered features for iOS 26 and macOS 26. It serves as a practical guide for understanding and implementing advanced AI functionalities, including conversational interfaces, system integrations, and health data analysis, directly within the Apple ecosystem.

How It Works

The framework provides playground examples organized by chapters, demonstrating core FMF capabilities through Swift code. It emphasizes practical implementation of multi-turn conversations with context management, streaming responses, and structured data generation using @Generable models. The approach highlights seamless integration with system services via nine distinct tools (e.g., Weather, Web Search, Calendar) and enables voice interaction through speech-to-text and text-to-speech capabilities.

Quick Start & Requirements

  • Primary install / run command: Clone the repository and open FoundationLab.xcodeproj in Xcode.
  • Non-default prerequisites and dependencies: iOS 26.0+ or macOS 26.0+ (Xcode 26.0+), a compatible Apple device with Apple Silicon, and Apple Intelligence enabled.
  • Links: TestFlight beta available at: https://testflight.apple.com/join/JWR9FpP3.

Highlighted Details

  • Core Capabilities: Features multi-turn chat with context management and streaming, structured data generation with type safety, and tool calling for system integrations (Weather, Web Search, Contacts, Calendar, Reminders, Location, Health, Music, Web Metadata).
  • Advanced Features: Includes a voice interface (STT/TTS), an AI-powered Health Dashboard leveraging HealthKit, and Retrieval-Augmented Generation (RAG) with document indexing.
  • Multilingual Support: Operates in 10 languages, with examples for language detection and code-switching.
  • Dynamic Schemas: Demonstrates schema examples from basic to expert levels, including form builders and invoice processing.

Maintenance & Community

Contributions are welcome via pull requests. No specific community channels or maintainer details are listed in the provided README.

Licensing & Compatibility

Licensed under the MIT License, permitting broad use, modification, and distribution, including for commercial purposes.

Limitations & Caveats

This project is strictly tied to Apple's platform, requiring specific hardware (Apple Silicon) and software versions (iOS/macOS 26+, Apple Intelligence enabled), significantly limiting its applicability outside the Apple ecosystem.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
24
Issues (30d)
1
Star History
37 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.