@@ -30,7 +30,7 @@ public struct GenerateContentResponse: Sendable {
3030 }
3131
3232 /// A list of candidate response content, ordered from best to worst.
33- public let candidates : [ CandidateResponse ]
33+ public let candidates : [ Candidate ]
3434
3535 /// A value containing the safety ratings for the response, or, if the request was blocked, a
3636 /// reason for blocking the request.
@@ -82,7 +82,7 @@ public struct GenerateContentResponse: Sendable {
8282 }
8383
8484 /// Initializer for SwiftUI previews or tests.
85- public init ( candidates: [ CandidateResponse ] , promptFeedback: PromptFeedback ? = nil ,
85+ public init ( candidates: [ Candidate ] , promptFeedback: PromptFeedback ? = nil ,
8686 usageMetadata: UsageMetadata ? = nil ) {
8787 self . candidates = candidates
8888 self . promptFeedback = promptFeedback
@@ -93,7 +93,7 @@ public struct GenerateContentResponse: Sendable {
9393/// A struct representing a possible reply to a content generation prompt. Each content generation
9494/// prompt may produce multiple candidate responses.
9595@available ( iOS 15 . 0 , macOS 11 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
96- public struct CandidateResponse : Sendable {
96+ public struct Candidate : Sendable {
9797 /// The response's content.
9898 public let content : ModelContent
9999
@@ -279,7 +279,7 @@ extension GenerateContentResponse: Decodable {
279279 }
280280
281281 if let candidates = try container. decodeIfPresent (
282- [ CandidateResponse ] . self,
282+ [ Candidate ] . self,
283283 forKey: . candidates
284284 ) {
285285 self . candidates = candidates
@@ -309,7 +309,7 @@ extension GenerateContentResponse.UsageMetadata: Decodable {
309309}
310310
311311@available ( iOS 15 . 0 , macOS 11 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
312- extension CandidateResponse : Decodable {
312+ extension Candidate : Decodable {
313313 enum CodingKeys : CodingKey {
314314 case content
315315 case safetyRatings
0 commit comments