callstackincubator/ai 是从 https://github.com/callstackincubator/ai. 导入的代理技能候选
概览
callstackincubator/ai 是从 https://github.com/callstackincubator/ai. 导入的代理技能候选
概述(AI 翻译)
一套适用于React Native的设备端AI原语,支持一流的Vercel AI SDK。可直接在用户设备上运行AI模型,实现隐私保护、低延迟的推断,无需服务器成本。
特色
- 🚀 即时AI - 无需下载即可立即使用内置系统模型
- 🔒 隐私优先 - 所有处理均在设备上进行,数据保持本地
- 🎯 Vercel AI SDK 兼容 - 用熟悉的 API 直接替换
- 🎨 完整工具包 - 文本生成、嵌入、转录、语音合成
AI SDK 兼容性
| React Native AI | AI SDK |
|---|---|
| 0.11及以下 | v5 |
| 0.12及以上 | v6 |
开发工具
AI SDK Profiler 插件捕获了 Vercel AI SDK 的 OpenTelemetry 范围 请求并用于 Rozenite DevTools 中进行表象处理。DevTools 是运行时 它们是中立的,所以它们支持设备内和远程运行时。
Rozenite必须在你的应用中安装并启用。参见 Rozenite入门指南。
Expo演示应用在apps/expo-example中
为该插件包含原生开发的Rozenite布线。运行示例
应用,打开 React Native DevTools,选择 AI SDK Profiler 以检查聊天
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
React Native AI
A collection of on-device AI primitives for React Native with first-class Vercel AI SDK support. Run AI models directly on users’ devices for privacy-preserving, low-latency inference without server costs.
Features
- 🚀 Instant AI - Use built-in system models immediately without downloads
- 🔒 Privacy-first - Inference runs on-device, so data stays local. Cloud models are opt-in
- 🎯 Vercel AI SDK compatible - Use
generateText,streamText,embedand other AI SDK functions with local models - 🎨 Beyond text - Embeddings, transcription, speech synthesis, image and video generation, and vision models
AI SDK Compatibility
| React Native AI | AI SDK |
|---|---|
| 0.11 and below | v5 |
| 0.12 | v6 |
| 0.13 and above | v7 |
DevTools
The AI SDK Profiler plugin captures OpenTelemetry spans from Vercel AI SDK requests and surfaces them in Rozenite DevTools. DevTools are runtime agnostic, so they work with on-device and remote runtimes.
npm install @react-native-ai/dev-tools
Rozenite must be installed and enabled in your app. See the Rozenite getting started guide.
If the AI SDK Profiler panel stays empty after you send a message, close the
React Native DevTools window and open a new one. A stale debugger session can
keep the panel mounted without receiving telemetry.
Available Providers
| Provider | Built-in | Platforms | Runtime | Description |
|---|---|---|---|---|
| Apple | ✅ Yes | iOS | Apple | Apple Foundation Models, embeddings, transcription, speech |
| Android | ✅ Yes | Android | ML Kit GenAI | On-device Gemini Nano, transcription and embeddings |
| Core AI | ❌ No | iOS | Core AI | Text, image, video, speech, embedding and vision models |
| Llama | ❌ No | iOS, Android | llama.rn | Run GGUF models via llama.rn |
Apple
Native integration with Apple’s on-device AI capabilities. Built-in - no model downloads required, uses system models.
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add callstackincubator/ai