func sendPrompt() async {
   do {
      let answer = try await session.respond(to: prompt)
      var newResponse = AttributedString("\(answer.content)\n\n")
      newResponse.font = .system(size: 16, weight: .regular)
      response.append(newResponse)
   } catch LanguageModelSession.GenerationError.assetsUnavailable(let reason) {
      response = AttributedString("The model is not available")
      print(reason.debugDescription)
   } catch LanguageModelSession.GenerationError.unsupportedLanguageOrLocale(let reason) {
      response = AttributedString("Apple Intelligence not supported in your region")
      print(reason.debugDescription)
   } catch LanguageModelSession.GenerationError.rateLimited(let reason) {
      response = AttributedString("The app has exceeded its usage rate limits")
      print(reason.debugDescription)
   } catch LanguageModelSession.GenerationError.concurrentRequests(let reason) {
      response = AttributedString("Wait for the previous prompt to be processed")
      print(reason.debugDescription)
   } catch {
      response = AttributedString("Error accessing the model: \(error)")
   }
   prompt = ""
}