Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig

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

Overview

Generation config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1GenerationConfig

Returns a new instance of GoogleCloudAiplatformV1GenerationConfig.



10034
10035
10036
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10034

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

Instance Attribute Details

#candidate_countFixnum

Optional. Number of candidates to generate. Corresponds to the JSON property candidateCount

Returns:

  • (Fixnum)


9997
9998
9999
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 9997

def candidate_count
  @candidate_count
end

#frequency_penaltyFloat

Optional. Frequency penalties. Corresponds to the JSON property frequencyPenalty

Returns:

  • (Float)


10002
10003
10004
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10002

def frequency_penalty
  @frequency_penalty
end

#max_output_tokensFixnum

Optional. The maximum number of output tokens to generate per message. Corresponds to the JSON property maxOutputTokens

Returns:

  • (Fixnum)


10007
10008
10009
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10007

def max_output_tokens
  @max_output_tokens
end

#presence_penaltyFloat

Optional. Positive penalties. Corresponds to the JSON property presencePenalty

Returns:

  • (Float)


10012
10013
10014
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10012

def presence_penalty
  @presence_penalty
end

#stop_sequencesArray<String>

Optional. Stop sequences. Corresponds to the JSON property stopSequences

Returns:

  • (Array<String>)


10017
10018
10019
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10017

def stop_sequences
  @stop_sequences
end

#temperatureFloat

Optional. Controls the randomness of predictions. Corresponds to the JSON property temperature

Returns:

  • (Float)


10022
10023
10024
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10022

def temperature
  @temperature
end

#top_kFloat

Optional. If specified, top-k sampling will be used. Corresponds to the JSON property topK

Returns:

  • (Float)


10027
10028
10029
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10027

def top_k
  @top_k
end

#top_pFloat

Optional. If specified, nucleus sampling will be used. Corresponds to the JSON property topP

Returns:

  • (Float)


10032
10033
10034
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10032

def top_p
  @top_p
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10039

def update!(**args)
  @candidate_count = args[:candidate_count] if args.key?(:candidate_count)
  @frequency_penalty = args[:frequency_penalty] if args.key?(:frequency_penalty)
  @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
  @presence_penalty = args[:presence_penalty] if args.key?(:presence_penalty)
  @stop_sequences = args[:stop_sequences] if args.key?(:stop_sequences)
  @temperature = args[:temperature] if args.key?(:temperature)
  @top_k = args[:top_k] if args.key?(:top_k)
  @top_p = args[:top_p] if args.key?(:top_p)
end