Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaGenerateGroundedContentRequestGenerationSpec

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

Overview

Content generation specification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaGenerateGroundedContentRequestGenerationSpec

Returns a new instance of GoogleCloudDiscoveryengineV1alphaGenerateGroundedContentRequestGenerationSpec.



10495
10496
10497
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10495

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

Instance Attribute Details

#frequency_penaltyFloat

If specified, custom value for frequency penalty will be used. Corresponds to the JSON property frequencyPenalty

Returns:

  • (Float)


10452
10453
10454
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10452

def frequency_penalty
  @frequency_penalty
end

#language_codeString

Language code for content. Use language tags defined by BCP47. Corresponds to the JSON property languageCode

Returns:

  • (String)


10458
10459
10460
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10458

def language_code
  @language_code
end

#max_output_tokensFixnum

If specified, custom value for max output tokens will be used. Corresponds to the JSON property maxOutputTokens

Returns:

  • (Fixnum)


10463
10464
10465
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10463

def max_output_tokens
  @max_output_tokens
end

#model_idString

Specifies which Vertex model id to use for generation. Corresponds to the JSON property modelId

Returns:

  • (String)


10468
10469
10470
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10468

def model_id
  @model_id
end

#presence_penaltyFloat

If specified, custom value for presence penalty will be used. Corresponds to the JSON property presencePenalty

Returns:

  • (Float)


10473
10474
10475
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10473

def presence_penalty
  @presence_penalty
end

#seedFixnum

If specified, custom value for the seed will be used. Corresponds to the JSON property seed

Returns:

  • (Fixnum)


10478
10479
10480
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10478

def seed
  @seed
end

#temperatureFloat

If specified, custom value for the temperature will be used. Corresponds to the JSON property temperature

Returns:

  • (Float)


10483
10484
10485
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10483

def temperature
  @temperature
end

#top_kFixnum

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

Returns:

  • (Fixnum)


10488
10489
10490
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10488

def top_k
  @top_k
end

#top_pFloat

If specified, custom value for nucleus sampling will be used. Corresponds to the JSON property topP

Returns:

  • (Float)


10493
10494
10495
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10493

def top_p
  @top_p
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 10500

def update!(**args)
  @frequency_penalty = args[:frequency_penalty] if args.key?(:frequency_penalty)
  @language_code = args[:language_code] if args.key?(:language_code)
  @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
  @model_id = args[:model_id] if args.key?(:model_id)
  @presence_penalty = args[:presence_penalty] if args.key?(:presence_penalty)
  @seed = args[:seed] if args.key?(:seed)
  @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