Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
That sounds kind of cool. How did you do that or are there instructions on how to do it?
It's actually really simple. If you have XCode, you can just create a Playground and paste the following:

import FoundationModels

let session = LanguageModelSession()
let response = try await session.respond(
to: "Write a sonnet about Macs."
)

print(response.content)

Or in terminal, you can also just paste this into a file named llm.swift (or anything .swift) and enter swiftc llm.swift. You can then run ./llm and it'll write the sonnet.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.