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 LanguageModelError.guardrailViolation(let reason) {
      response.append(AttributedString("Error processing the prompt\n\n"))
      print(reason.debugDescription)
   } catch LanguageModelError.refusal(let refusal) {
      let explanation = (try? await refusal.explanation.content) ?? refusal.debugDescription
      response.append(AttributedString("Refusal: \(explanation)\n\n"))
   } catch {
      response.append(AttributedString("Error accessing the model: \(error)\n\n"))
   }
   prompt = ""
}