Class: Google::Apis::CesV1::DataStoreToolGroundingConfig

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

Overview

Grounding configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DataStoreToolGroundingConfig

Returns a new instance of DataStoreToolGroundingConfig.



2516
2517
2518
# File 'lib/google/apis/ces_v1/classes.rb', line 2516

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

Instance Attribute Details

#disabledBoolean Also known as: disabled?

Optional. Whether grounding is disabled. Corresponds to the JSON property disabled

Returns:

  • (Boolean)


2503
2504
2505
# File 'lib/google/apis/ces_v1/classes.rb', line 2503

def disabled
  @disabled
end

#grounding_levelFloat

Optional. The groundedness threshold of the answer based on the retrieved sources. The value has a configurable range of [1, 5]. The level is used to threshold the groundedness of the answer, meaning that all responses with a groundedness score below the threshold will fall back to returning relevant snippets only. For example, a level of 3 means that the groundedness score must be 3 or higher for the response to be returned. Corresponds to the JSON property groundingLevel

Returns:

  • (Float)


2514
2515
2516
# File 'lib/google/apis/ces_v1/classes.rb', line 2514

def grounding_level
  @grounding_level
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2521
2522
2523
2524
# File 'lib/google/apis/ces_v1/classes.rb', line 2521

def update!(**args)
  @disabled = args[:disabled] if args.key?(:disabled)
  @grounding_level = args[:grounding_level] if args.key?(:grounding_level)
end