Class: Google::Apis::BigqueryV2::GenAiFunctionStats

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

Overview

Provides statistics for each Ai function call within a query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenAiFunctionStats

Returns a new instance of GenAiFunctionStats.



3947
3948
3949
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3947

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

Instance Attribute Details

#cache_statsGoogle::Apis::BigqueryV2::GenAiFunctionCacheStats

Provides cache statistics for a GenAi function call. Corresponds to the JSON property cacheStats



3919
3920
3921
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3919

def cache_stats
  @cache_stats
end

#cost_optimization_statsGoogle::Apis::BigqueryV2::GenAiFunctionCostOptimizationStats

Provides cost optimization statistics for a GenAi function call. Corresponds to the JSON property costOptimizationStats



3924
3925
3926
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3924

def cost_optimization_stats
  @cost_optimization_stats
end

#error_statsGoogle::Apis::BigqueryV2::GenAiFunctionErrorStats

Provides error statistics for a GenAi function call. Corresponds to the JSON property errorStats



3929
3930
3931
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3929

def error_stats
  @error_stats
end

#function_nameString

Name of the function. Corresponds to the JSON property functionName

Returns:

  • (String)


3934
3935
3936
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3934

def function_name
  @function_name
end

#num_processed_rowsFixnum

Number of rows processed by this GenAi function. This includes all cost_optimized, llm_inferred and failed_rows. Corresponds to the JSON property numProcessedRows

Returns:

  • (Fixnum)


3940
3941
3942
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3940

def num_processed_rows
  @num_processed_rows
end

#promptString

User input prompt of the function (truncated to 20 chars). Corresponds to the JSON property prompt

Returns:

  • (String)


3945
3946
3947
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3945

def prompt
  @prompt
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3952
3953
3954
3955
3956
3957
3958
3959
# File 'lib/google/apis/bigquery_v2/classes.rb', line 3952

def update!(**args)
  @cache_stats = args[:cache_stats] if args.key?(:cache_stats)
  @cost_optimization_stats = args[:cost_optimization_stats] if args.key?(:cost_optimization_stats)
  @error_stats = args[:error_stats] if args.key?(:error_stats)
  @function_name = args[:function_name] if args.key?(:function_name)
  @num_processed_rows = args[:num_processed_rows] if args.key?(:num_processed_rows)
  @prompt = args[:prompt] if args.key?(:prompt)
end