SKILL

foundation-models-on-device

Apple FoundationModels 框架,用于端侧 LLM——文本生成、使用 @Generable 的引导式生成、工具调用,以及 iOS 26+ 中的快照流式传输。适用于在 iOS 26+ 上使用 Apple FoundationModels 添加端侧 LLM 功能时。

机器翻译
查看英文原文

Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+. Use when adding on-device LLM features with Apple FoundationModels on iOS 26+.

适用对象:移动应用开发。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • FoundationModels: On-Device LLM (iOS 26)
  • When to Activate
  • Core Pattern — Availability Check
  • Core Pattern — Basic Session
  • Core Pattern — Guided Generation with @Generable
  • 1. Define a Generable Type
  • 2. Request Structured Output
  • Supported @Guide Constraints

Patterns for integrating Apple's on-device language model into apps using the FoundationModels framework. Covers text generation, structured output with @Generable, custom tool calling, and snapshot streaming — all running on-device for privacy and offline support. Building AI-powered features using Apple Intelligence on-device Generating or summarizing text without cloud dependency Extracting structured data from natural language input Implementing custom tool calling for domain-specific AI actions Streaming structured responses for real-time UI updates Need privacy-preserving AI (no data leaves the device) Always check model availability before creating a session: Key points for instructions: Define the model's role ("You are a mentor") Specify what to do ("Help extract calendar events") Set style preferences ("Respond as briefly as possible") Add safety measures ("Respond with 'I can't help with that' for dangerous requests") Generate structured Swift types instead of raw strings: .range(0...20) — numeric range .count(3) — array element count description: — semantic guidance for generation Let the model invoke custom code for domain-specific tasks: Stream structured responses fo

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
affaan-m/ECC
源文件
pi/core/skills/foundation-models-on-device/SKILL.md
固定版本
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:43.010Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。