包阅导读总结
1.
关键词:Apple、Swift Assist、AI 代码生成、Xcode、Cloud
2.
总结:Apple 宣布推出首个 AI 代码生成模型 Swift Assist,它是编码任务的辅助工具,集成于 Xcode,能从自然语言提示生成代码,运行于云端,可帮助开发者完成多种任务,今年晚些时候将在除欧盟国家外普遍可用。
3.
主要内容:
– Apple 推出 AI 代码生成模型 Swift Assist
– 旨在帮助开发者将想法转化为代码,专注于高层问题
– 运行于苹果云,集成到 Xcode
– 能根据自然语言提示生成代码
– 优势和特点
– 可轻松完成如探索新框架等任务
– 云端运行保证及时更新
– 用户代码仅用于处理请求,不存储或用于训练
– 示例展示
– 从空 Xcode 项目创建经典 Mac 目录应用
– 实现多种需求修改,如添加图片、改变布局
– 发展情况
– 与 Xcode 预测代码完成是苹果工具智能化的第一步
– 未透露模型细节,应是特定训练的大参数模型
– 今年晚些时候除欧盟国家外普遍可用,因数字市场法案相关监管不确定性
思维导图:
文章来源:infoq.com
作者:Sergio De Simone
发布时间:2024/6/22 0:00
语言:英文
总字数:452字
预计阅读时间:2分钟
评分:84分
标签:apple swift assist llm,开发,苹果,Swift,移动
以下为原文内容
本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com
Described as a companion tool for all coding tasks, Swift Assist aims to help developers transform ideas into code and focus on higher-level problems. Powered by a model running in Apple’s Cloud, Swift Assist is integrated into Xcode and can generate code from a prompt expressed in human language.
With Swift Assist, tasks like exploring new frameworks and experimenting with new ideas are just one request away. Swift Assist uses a powerful model that runs in the cloud.
For example, you can ask Swift Assist to convert a function to use async/await
, add a map with the user’s current location, improve the accessibility of a view, and so on.
One advantage of running in the Cloud, says Apple, is that Swift Assist will always be up-to-date with the latest software development kits (SDKs) and Swift language features. On the other hand, the company guarantees that user code will only be used to process requests and not be stored on Apple’s server nor used to train their models.
In his talk at WWDC 2024, Xcode and Swift Playground senior manager Ken Orr showed how to use Swift Assist to help create an app to catalog classic Macs starting from an empty Xcode project.
Orr’s first prompt was “Create a list of classic Macs with name and description”, to which Swift Assist responded by creating a ClassicMac
struct
to represent Mac models and a SwiftUI view with a pre-filled array of Macs and a List
to display them. Then he asked Swift Assist to “add images next to each Mac”, which caused the existing struct
to be modified to include the image name, whereby images of Mac models were taken from the project asset catalog. Accordingly, the SwiftUI view was modified to include the image in the list. As a further example of Swift Assist flexibility, Orr asked, “Show the Macs on a grid instead of a list”, which caused the code to be instantly modified to use a LazyVGrid
.
Swift Assist can help developers complete many different tasks, including localizing a view, adding login support, adding more examples to a list, and converting between different Stack types, explained Orr.
According to Orr, Swift Assist, along with Xcode predictive code completion, are just the first step to include more “intelligence” into Apple’s tools, but he did not provide any additional information as to Apple’s roadmap.
Apple hasn’t released much detail about the model powering Swift Assist, but according to Trail of Bits’ Artem Dinaburg, it should be a 70B+ parameter model specifically trained on Swift Code, SDKs, and documentation.
Swift Assist will be generally available later this year except for EU countries, says Apple, due to regulatory uncertainties related to the Digital Marketplace Act.