This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FoundationModels | |
import Playgrounds | |
import Foundation | |
let session = LanguageModelSession() | |
let start = Date() | |
let response = try await session.respond(to: "What is Apple Neural Engine and how to use it?") | |
let responseText = response.content // Replace 'value' with the actual property name from LanguageModelSession.Response<String> that holds the string payload. | |
print(responseText) | |
let end = Date() |