Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Candidate

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Generated candidate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Candidate

Returns a new instance of GoogleCloudAiplatformV1beta1Candidate.



1935
1936
1937
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1935

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#citation_metadataGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CitationMetadata

A collection of source attributions for a piece of content. Corresponds to the JSON property citationMetadata



1907
1908
1909
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1907

def 
  @citation_metadata
end

#contentGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

A single turn in a conversation with the model. Corresponds to the JSON property content



1912
1913
1914
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1912

def content
  @content
end

#finish_messageString

Output only. A string that describes the filtering behavior in more detail. Only filled when reason is set. Corresponds to the JSON property finishMessage

Returns:

  • (String)


1918
1919
1920
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1918

def finish_message
  @finish_message
end

#finish_reasonString

Output only. The reason why the model stopped generating tokens. Corresponds to the JSON property finishReason

Returns:

  • (String)


1923
1924
1925
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1923

def finish_reason
  @finish_reason
end

#indexFixnum

Output only. Index of the candidate. Corresponds to the JSON property index

Returns:

  • (Fixnum)


1928
1929
1930
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1928

def index
  @index
end

#safety_ratingsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SafetyRating>

Output only. Safety ratings of the generated content. Corresponds to the JSON property safetyRatings



1933
1934
1935
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1933

def safety_ratings
  @safety_ratings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1940
1941
1942
1943
1944
1945
1946
1947
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 1940

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)
  @index = args[:index] if args.key?(:index)
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
end