PredictSummary
The PredictSummary
struct contains a summary based on a consultation analysis. It is typically used to provide a brief overview or final analysis result generated by the machine learning model.
Fields
- summary: (String?) - The textual summary of the prediction.
Example of Handling a Predicted Summary
Once the summary is retrieved from the analysis, it can be printed or passed to other functions for further processing.
// Function to handle a predicted summary
func handlePredictedSummary(predictSummary: PredictSummary) {
if let summaryText = predictSummary.summary {
print("Prediction Summary: \(summaryText)")
} else {
print("No summary available")
}
}
// Example of handling a predicted summary
let predictSummary = PredictSummary(summary: "This is a summary based on the consultation analysis.")
handlePredictedSummary(predictSummary: predictSummary)