In my experience, SwiftUI’s “learn once, apply anywhere” often turns into “learn once, learn twice, apply somewhere, debug everywhere.”
本文将 Prompt API 定位为最灵活、最值得 AI 工程师关注的接口,对应官方文档 https://developer.chrome.com/docs/ai/prompt-api。它支持通过 LanguageModel.create() 创建会话,并传入 initialPrompts 实现系统角色与示例对话。文章演示了用其完成 JSON Schema 约束输出、情感分析等任务,同时指出该 API 目前仍需手动开启 flag。