GenerateContentResponse

@Serializable
data class GenerateContentResponse(val candidates: List<Candidate>, val promptFeedback: PromptFeedback? = null)

Represents the response structure for a content generation or analysis request.

This data class encapsulates the results of a request to generate or analyze content, including a list of generated content candidates and feedback on the prompt used for generation. The feedback includes safety ratings that assess the prompt's compliance with various content guidelines.

Constructors

Link copied to clipboard
constructor(candidates: List<Candidate>, promptFeedback: PromptFeedback? = null)

Properties

Link copied to clipboard

A list of Candidate objects, each representing a possible outcome or version of the generated or analyzed content.

Link copied to clipboard

A PromptFeedback object providing safety ratings for the prompt, offering insights into its adherence to content safety standards.