Not sure I understand "Apple AI being unusable". I always include the following in the session instructions: "The person's locale is (locale.identifier)." And the response is in the expected language, which must be in the list of languages supported by AI (which is not the same as Siri's language).
/// Returns locale instructions for the model following Apple's recommended approach.
private static func localeInstructions() -> String {
guard let preferredLanguage = Bundle.main.preferredLocalizations.first else {
return ""
}
let locale = Locale(identifier: preferredLanguage)
if Locale.Language(identifier: "en_US").isEquivalent(to: locale.language) {
return ""
} else {
return "The person's locale is \(locale.identifier)."
}
}
Topic:
Machine Learning & AI
SubTopic:
General
Tags: