react-native-apple-llm  by deveix

React Native plugin for Apple's on-device LLM

Created 4 months ago
279 stars

Top 93.1% on SourcePulse

GitHubView on GitHub
Project Summary

This plugin provides React Native developers with access to Apple's on-device Foundation Models, enabling privacy-focused AI features within mobile applications. It allows for text generation, structured JSON output, and custom tool integration, all processed locally on supported Apple devices.

How It Works

The plugin leverages Apple's native Foundation Model framework, ensuring all LLM processing occurs on-device. This approach enhances user privacy by preventing data from being sent to external servers. It supports structured data generation via JSON schemas and allows developers to define custom tools that the LLM can utilize to perform specific actions, such as fetching real-time data.

Quick Start & Requirements

  • Installation: npm install react-native-apple-llm (or yarn add, pnpm add).
  • Native Linking: npx pod-install (or cd ios && pod install).
  • Prerequisites: iOS 17.0+, Xcode 16+, an Apple Intelligence-enabled device (iPhone 15 Pro, iPhone 16 series, M1+ iPad/Mac) or simulator (macOS 14+ required).
  • Documentation: Apple's Foundation Models Documentation, React Native Documentation.

Highlighted Details

  • On-device Apple Intelligence access for privacy and offline capabilities.
  • Structured JSON output generation based on defined schemas.
  • Support for custom tools, enabling LLMs to interact with external functions.
  • TypeScript support for enhanced developer experience.

Maintenance & Community

  • Contributors: Ahmed Kasem, Erik, and future contributors.
  • Community: Contributions are welcome via Pull Requests; open an issue for major changes.
  • Related Projects: Links to Apple's Foundation Models Documentation and React Native Documentation.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Suitable for commercial use.

Limitations & Caveats

This is a beta feature, and users may encounter bugs or compatibility issues. Streaming support and advanced function calling capabilities are listed as future TODO items.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
19 stars in the last 30 days

Explore Similar Projects

Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Tom Moor Tom Moor(Head of Engineering at Linear; Founder of Outline), and
6 more.

promptable by cfortuner

0%
2k
TS/JS library for building full-stack AI apps
Created 2 years ago
Updated 2 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Pietro Schirano Pietro Schirano(Founder of MagicPath), and
1 more.

SillyTavern by SillyTavern

0.9%
19k
LLM frontend for power users
Created 2 years ago
Updated 15 hours ago
Feedback? Help us improve.