Class: Google::Apis::FirebasemlV2beta::Candidate
- Inherits:
-
Object
- Object
- Google::Apis::FirebasemlV2beta::Candidate
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firebaseml_v2beta/classes.rb,
lib/google/apis/firebaseml_v2beta/representations.rb,
lib/google/apis/firebaseml_v2beta/representations.rb
Overview
A response candidate generated from the model.
Instance Attribute Summary collapse
-
#citation_metadata ⇒ Google::Apis::FirebasemlV2beta::CitationMetadata
A collection of source attributions for a piece of content.
-
#content ⇒ Google::Apis::FirebasemlV2beta::Content
The base structured datatype containing multi-part content of a message.
-
#finish_message ⇒ String
Output only.
-
#finish_reason ⇒ String
Output only.
-
#grounding_metadata ⇒ Google::Apis::FirebasemlV2beta::GroundingMetadata
Metadata returned to client when grounding is enabled.
-
#index ⇒ Fixnum
Output only.
-
#safety_ratings ⇒ Array<Google::Apis::FirebasemlV2beta::SafetyRating>
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Candidate
constructor
A new instance of Candidate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Candidate
Returns a new instance of Candidate.
96 97 98 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 96 def initialize(**args) update!(**args) end |
Instance Attribute Details
#citation_metadata ⇒ Google::Apis::FirebasemlV2beta::CitationMetadata
A collection of source attributions for a piece of content.
Corresponds to the JSON property citationMetadata
58 59 60 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 58 def @citation_metadata end |
#content ⇒ Google::Apis::FirebasemlV2beta::Content
The base structured datatype containing multi-part content of a message. A
Content includes a role field designating the producer of the Content and
a parts field containing multi-part data that contains the content of the
message turn.
Corresponds to the JSON property content
66 67 68 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 66 def content @content end |
#finish_message ⇒ String
Output only. Describes the reason the mode stopped generating tokens in more
detail. This is only filled when finish_reason is set.
Corresponds to the JSON property finishMessage
72 73 74 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 72 def @finish_message end |
#finish_reason ⇒ String
Output only. The reason why the model stopped generating tokens. If empty, the
model has not stopped generating the tokens.
Corresponds to the JSON property finishReason
78 79 80 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 78 def finish_reason @finish_reason end |
#grounding_metadata ⇒ Google::Apis::FirebasemlV2beta::GroundingMetadata
Metadata returned to client when grounding is enabled.
Corresponds to the JSON property groundingMetadata
83 84 85 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 83 def @grounding_metadata end |
#index ⇒ Fixnum
Output only. Index of the candidate.
Corresponds to the JSON property index
88 89 90 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 88 def index @index end |
#safety_ratings ⇒ Array<Google::Apis::FirebasemlV2beta::SafetyRating>
Output only. List of ratings for the safety of a response candidate. There is
at most one rating per category.
Corresponds to the JSON property safetyRatings
94 95 96 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 94 def @safety_ratings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
101 102 103 104 105 106 107 108 109 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 101 def update!(**args) @citation_metadata = args[:citation_metadata] if args.key?(:citation_metadata) @content = args[:content] if args.key?(:content) @finish_message = args[:finish_message] if args.key?(:finish_message) @finish_reason = args[:finish_reason] if args.key?(:finish_reason) @grounding_metadata = args[:grounding_metadata] if args.key?(:grounding_metadata) @index = args[:index] if args.key?(:index) @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings) end |