Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGenerationSpec

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

Overview

Content generation specification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGenerationSpec

Returns a new instance of GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGenerationSpec.



5480
5481
5482
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5480

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)


5437
5438
5439
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5437

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)


5443
5444
5445
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5443

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)


5448
5449
5450
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5448

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)


5453
5454
5455
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5453

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)


5458
5459
5460
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5458

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)


5463
5464
5465
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5463

def seed
  @seed
end

#temperatureFloat

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

Returns:

  • (Float)


5468
5469
5470
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5468

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)


5473
5474
5475
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5473

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)


5478
5479
5480
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5478

def top_p
  @top_p
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5485

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