google-apis-aiplatform_v1 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2607,6 +2607,86 @@ module Google
|
|
2607
2607
|
end
|
2608
2608
|
end
|
2609
2609
|
|
2610
|
+
# The request set for the evaluation run.
|
2611
|
+
class GoogleCloudAiplatformV1BigQueryRequestSet
|
2612
|
+
include Google::Apis::Core::Hashable
|
2613
|
+
|
2614
|
+
# Optional. Map of candidate name to candidate response column name. The column
|
2615
|
+
# will be in evaluation_item.CandidateResponse format.
|
2616
|
+
# Corresponds to the JSON property `candidateResponseColumns`
|
2617
|
+
# @return [Hash<String,String>]
|
2618
|
+
attr_accessor :candidate_response_columns
|
2619
|
+
|
2620
|
+
# Optional. The name of the column that contains the requests to evaluate. This
|
2621
|
+
# will be in evaluation_item.EvalPrompt format.
|
2622
|
+
# Corresponds to the JSON property `promptColumn`
|
2623
|
+
# @return [String]
|
2624
|
+
attr_accessor :prompt_column
|
2625
|
+
|
2626
|
+
# Optional. The name of the column that contains the rubrics. This will be in
|
2627
|
+
# evaluation_rubric.RubricGroup format (cl/762595858).
|
2628
|
+
# Corresponds to the JSON property `rubricsColumn`
|
2629
|
+
# @return [String]
|
2630
|
+
attr_accessor :rubrics_column
|
2631
|
+
|
2632
|
+
# The sampling config.
|
2633
|
+
# Corresponds to the JSON property `samplingConfig`
|
2634
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BigQueryRequestSetSamplingConfig]
|
2635
|
+
attr_accessor :sampling_config
|
2636
|
+
|
2637
|
+
# Required. The URI of a BigQuery table. e.g. bq://projectId.bqDatasetId.
|
2638
|
+
# bqTableId
|
2639
|
+
# Corresponds to the JSON property `uri`
|
2640
|
+
# @return [String]
|
2641
|
+
attr_accessor :uri
|
2642
|
+
|
2643
|
+
def initialize(**args)
|
2644
|
+
update!(**args)
|
2645
|
+
end
|
2646
|
+
|
2647
|
+
# Update properties of this object
|
2648
|
+
def update!(**args)
|
2649
|
+
@candidate_response_columns = args[:candidate_response_columns] if args.key?(:candidate_response_columns)
|
2650
|
+
@prompt_column = args[:prompt_column] if args.key?(:prompt_column)
|
2651
|
+
@rubrics_column = args[:rubrics_column] if args.key?(:rubrics_column)
|
2652
|
+
@sampling_config = args[:sampling_config] if args.key?(:sampling_config)
|
2653
|
+
@uri = args[:uri] if args.key?(:uri)
|
2654
|
+
end
|
2655
|
+
end
|
2656
|
+
|
2657
|
+
# The sampling config.
|
2658
|
+
class GoogleCloudAiplatformV1BigQueryRequestSetSamplingConfig
|
2659
|
+
include Google::Apis::Core::Hashable
|
2660
|
+
|
2661
|
+
# Optional. The total number of logged data to import. If available data is less
|
2662
|
+
# than the sampling count, all data will be imported. Default is 100.
|
2663
|
+
# Corresponds to the JSON property `samplingCount`
|
2664
|
+
# @return [Fixnum]
|
2665
|
+
attr_accessor :sampling_count
|
2666
|
+
|
2667
|
+
# Optional. How long to wait before sampling data from the BigQuery table. If
|
2668
|
+
# not specified, defaults to 0.
|
2669
|
+
# Corresponds to the JSON property `samplingDuration`
|
2670
|
+
# @return [String]
|
2671
|
+
attr_accessor :sampling_duration
|
2672
|
+
|
2673
|
+
# Optional. The sampling method to use.
|
2674
|
+
# Corresponds to the JSON property `samplingMethod`
|
2675
|
+
# @return [String]
|
2676
|
+
attr_accessor :sampling_method
|
2677
|
+
|
2678
|
+
def initialize(**args)
|
2679
|
+
update!(**args)
|
2680
|
+
end
|
2681
|
+
|
2682
|
+
# Update properties of this object
|
2683
|
+
def update!(**args)
|
2684
|
+
@sampling_count = args[:sampling_count] if args.key?(:sampling_count)
|
2685
|
+
@sampling_duration = args[:sampling_duration] if args.key?(:sampling_duration)
|
2686
|
+
@sampling_method = args[:sampling_method] if args.key?(:sampling_method)
|
2687
|
+
end
|
2688
|
+
end
|
2689
|
+
|
2610
2690
|
# The BigQuery location for the input content.
|
2611
2691
|
class GoogleCloudAiplatformV1BigQuerySource
|
2612
2692
|
include Google::Apis::Core::Hashable
|
@@ -3028,6 +3108,19 @@ module Google
|
|
3028
3108
|
end
|
3029
3109
|
end
|
3030
3110
|
|
3111
|
+
# Request message for EvaluationManagementService.CancelEvaluationRun.
|
3112
|
+
class GoogleCloudAiplatformV1CancelEvaluationRunRequest
|
3113
|
+
include Google::Apis::Core::Hashable
|
3114
|
+
|
3115
|
+
def initialize(**args)
|
3116
|
+
update!(**args)
|
3117
|
+
end
|
3118
|
+
|
3119
|
+
# Update properties of this object
|
3120
|
+
def update!(**args)
|
3121
|
+
end
|
3122
|
+
end
|
3123
|
+
|
3031
3124
|
# Request message for JobService.CancelHyperparameterTuningJob.
|
3032
3125
|
class GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest
|
3033
3126
|
include Google::Apis::Core::Hashable
|
@@ -3172,6 +3265,87 @@ module Google
|
|
3172
3265
|
end
|
3173
3266
|
end
|
3174
3267
|
|
3268
|
+
# Responses from model or agent.
|
3269
|
+
class GoogleCloudAiplatformV1CandidateResponse
|
3270
|
+
include Google::Apis::Core::Hashable
|
3271
|
+
|
3272
|
+
# Required. The name of the candidate that produced the response.
|
3273
|
+
# Corresponds to the JSON property `candidate`
|
3274
|
+
# @return [String]
|
3275
|
+
attr_accessor :candidate
|
3276
|
+
|
3277
|
+
# Text response.
|
3278
|
+
# Corresponds to the JSON property `text`
|
3279
|
+
# @return [String]
|
3280
|
+
attr_accessor :text
|
3281
|
+
|
3282
|
+
# Fields and values that can be used to populate the response template.
|
3283
|
+
# Corresponds to the JSON property `value`
|
3284
|
+
# @return [Object]
|
3285
|
+
attr_accessor :value
|
3286
|
+
|
3287
|
+
def initialize(**args)
|
3288
|
+
update!(**args)
|
3289
|
+
end
|
3290
|
+
|
3291
|
+
# Update properties of this object
|
3292
|
+
def update!(**args)
|
3293
|
+
@candidate = args[:candidate] if args.key?(:candidate)
|
3294
|
+
@text = args[:text] if args.key?(:text)
|
3295
|
+
@value = args[:value] if args.key?(:value)
|
3296
|
+
end
|
3297
|
+
end
|
3298
|
+
|
3299
|
+
# Result for a single candidate.
|
3300
|
+
class GoogleCloudAiplatformV1CandidateResult
|
3301
|
+
include Google::Apis::Core::Hashable
|
3302
|
+
|
3303
|
+
# Optional. Additional results for the metric.
|
3304
|
+
# Corresponds to the JSON property `additionalResults`
|
3305
|
+
# @return [Object]
|
3306
|
+
attr_accessor :additional_results
|
3307
|
+
|
3308
|
+
# Required. The candidate that is being evaluated. The value is the same as the
|
3309
|
+
# candidate name in the EvaluationRequest.
|
3310
|
+
# Corresponds to the JSON property `candidate`
|
3311
|
+
# @return [String]
|
3312
|
+
attr_accessor :candidate
|
3313
|
+
|
3314
|
+
# Optional. The explanation for the metric.
|
3315
|
+
# Corresponds to the JSON property `explanation`
|
3316
|
+
# @return [String]
|
3317
|
+
attr_accessor :explanation
|
3318
|
+
|
3319
|
+
# Required. The metric that was evaluated.
|
3320
|
+
# Corresponds to the JSON property `metric`
|
3321
|
+
# @return [String]
|
3322
|
+
attr_accessor :metric
|
3323
|
+
|
3324
|
+
# Optional. The rubric verdicts for the metric.
|
3325
|
+
# Corresponds to the JSON property `rubricVerdicts`
|
3326
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricVerdict>]
|
3327
|
+
attr_accessor :rubric_verdicts
|
3328
|
+
|
3329
|
+
# Optional. The score for the metric.
|
3330
|
+
# Corresponds to the JSON property `score`
|
3331
|
+
# @return [Float]
|
3332
|
+
attr_accessor :score
|
3333
|
+
|
3334
|
+
def initialize(**args)
|
3335
|
+
update!(**args)
|
3336
|
+
end
|
3337
|
+
|
3338
|
+
# Update properties of this object
|
3339
|
+
def update!(**args)
|
3340
|
+
@additional_results = args[:additional_results] if args.key?(:additional_results)
|
3341
|
+
@candidate = args[:candidate] if args.key?(:candidate)
|
3342
|
+
@explanation = args[:explanation] if args.key?(:explanation)
|
3343
|
+
@metric = args[:metric] if args.key?(:metric)
|
3344
|
+
@rubric_verdicts = args[:rubric_verdicts] if args.key?(:rubric_verdicts)
|
3345
|
+
@score = args[:score] if args.key?(:score)
|
3346
|
+
end
|
3347
|
+
end
|
3348
|
+
|
3175
3349
|
# This message will be placed in the metadata field of a google.longrunning.
|
3176
3350
|
# Operation associated with a CheckTrialEarlyStoppingState request.
|
3177
3351
|
class GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateMetatdata
|
@@ -8410,6 +8584,889 @@ module Google
|
|
8410
8584
|
end
|
8411
8585
|
end
|
8412
8586
|
|
8587
|
+
# EvaluationItem is a single evaluation request or result. The content of an
|
8588
|
+
# EvaluationItem is immutable - it cannot be updated once created.
|
8589
|
+
# EvaluationItems can be deleted when no longer needed.
|
8590
|
+
class GoogleCloudAiplatformV1EvaluationItem
|
8591
|
+
include Google::Apis::Core::Hashable
|
8592
|
+
|
8593
|
+
# Output only. Timestamp when this item was created.
|
8594
|
+
# Corresponds to the JSON property `createTime`
|
8595
|
+
# @return [String]
|
8596
|
+
attr_accessor :create_time
|
8597
|
+
|
8598
|
+
# Required. The display name of the EvaluationItem.
|
8599
|
+
# Corresponds to the JSON property `displayName`
|
8600
|
+
# @return [String]
|
8601
|
+
attr_accessor :display_name
|
8602
|
+
|
8603
|
+
# The `Status` type defines a logical error model that is suitable for different
|
8604
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
8605
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
8606
|
+
# data: error code, error message, and error details. You can find out more
|
8607
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
8608
|
+
# //cloud.google.com/apis/design/errors).
|
8609
|
+
# Corresponds to the JSON property `error`
|
8610
|
+
# @return [Google::Apis::AiplatformV1::GoogleRpcStatus]
|
8611
|
+
attr_accessor :error
|
8612
|
+
|
8613
|
+
# Required. The type of the EvaluationItem.
|
8614
|
+
# Corresponds to the JSON property `evaluationItemType`
|
8615
|
+
# @return [String]
|
8616
|
+
attr_accessor :evaluation_item_type
|
8617
|
+
|
8618
|
+
# Single evaluation request.
|
8619
|
+
# Corresponds to the JSON property `evaluationRequest`
|
8620
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRequest]
|
8621
|
+
attr_accessor :evaluation_request
|
8622
|
+
|
8623
|
+
# Evaluation result.
|
8624
|
+
# Corresponds to the JSON property `evaluationResponse`
|
8625
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationResult]
|
8626
|
+
attr_accessor :evaluation_response
|
8627
|
+
|
8628
|
+
# The GCS object where the request or response is stored.
|
8629
|
+
# Corresponds to the JSON property `gcsUri`
|
8630
|
+
# @return [String]
|
8631
|
+
attr_accessor :gcs_uri
|
8632
|
+
|
8633
|
+
# Optional. Labels for the EvaluationItem.
|
8634
|
+
# Corresponds to the JSON property `labels`
|
8635
|
+
# @return [Hash<String,String>]
|
8636
|
+
attr_accessor :labels
|
8637
|
+
|
8638
|
+
# Optional. Metadata for the EvaluationItem.
|
8639
|
+
# Corresponds to the JSON property `metadata`
|
8640
|
+
# @return [Object]
|
8641
|
+
attr_accessor :metadata
|
8642
|
+
|
8643
|
+
# Identifier. The resource name of the EvaluationItem. Format: `projects/`
|
8644
|
+
# project`/locations/`location`/evaluationItems/`evaluation_item``
|
8645
|
+
# Corresponds to the JSON property `name`
|
8646
|
+
# @return [String]
|
8647
|
+
attr_accessor :name
|
8648
|
+
|
8649
|
+
def initialize(**args)
|
8650
|
+
update!(**args)
|
8651
|
+
end
|
8652
|
+
|
8653
|
+
# Update properties of this object
|
8654
|
+
def update!(**args)
|
8655
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
8656
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
8657
|
+
@error = args[:error] if args.key?(:error)
|
8658
|
+
@evaluation_item_type = args[:evaluation_item_type] if args.key?(:evaluation_item_type)
|
8659
|
+
@evaluation_request = args[:evaluation_request] if args.key?(:evaluation_request)
|
8660
|
+
@evaluation_response = args[:evaluation_response] if args.key?(:evaluation_response)
|
8661
|
+
@gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
|
8662
|
+
@labels = args[:labels] if args.key?(:labels)
|
8663
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
8664
|
+
@name = args[:name] if args.key?(:name)
|
8665
|
+
end
|
8666
|
+
end
|
8667
|
+
|
8668
|
+
# Prompt to be evaluated.
|
8669
|
+
class GoogleCloudAiplatformV1EvaluationPrompt
|
8670
|
+
include Google::Apis::Core::Hashable
|
8671
|
+
|
8672
|
+
# Message to hold a prompt template and the values to populate the template.
|
8673
|
+
# Corresponds to the JSON property `promptTemplateData`
|
8674
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPromptPromptTemplateData]
|
8675
|
+
attr_accessor :prompt_template_data
|
8676
|
+
|
8677
|
+
# Text prompt.
|
8678
|
+
# Corresponds to the JSON property `text`
|
8679
|
+
# @return [String]
|
8680
|
+
attr_accessor :text
|
8681
|
+
|
8682
|
+
# Fields and values that can be used to populate the prompt template.
|
8683
|
+
# Corresponds to the JSON property `value`
|
8684
|
+
# @return [Object]
|
8685
|
+
attr_accessor :value
|
8686
|
+
|
8687
|
+
def initialize(**args)
|
8688
|
+
update!(**args)
|
8689
|
+
end
|
8690
|
+
|
8691
|
+
# Update properties of this object
|
8692
|
+
def update!(**args)
|
8693
|
+
@prompt_template_data = args[:prompt_template_data] if args.key?(:prompt_template_data)
|
8694
|
+
@text = args[:text] if args.key?(:text)
|
8695
|
+
@value = args[:value] if args.key?(:value)
|
8696
|
+
end
|
8697
|
+
end
|
8698
|
+
|
8699
|
+
# Message to hold a prompt template and the values to populate the template.
|
8700
|
+
class GoogleCloudAiplatformV1EvaluationPromptPromptTemplateData
|
8701
|
+
include Google::Apis::Core::Hashable
|
8702
|
+
|
8703
|
+
# The values for fields in the prompt template.
|
8704
|
+
# Corresponds to the JSON property `values`
|
8705
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
|
8706
|
+
attr_accessor :values
|
8707
|
+
|
8708
|
+
def initialize(**args)
|
8709
|
+
update!(**args)
|
8710
|
+
end
|
8711
|
+
|
8712
|
+
# Update properties of this object
|
8713
|
+
def update!(**args)
|
8714
|
+
@values = args[:values] if args.key?(:values)
|
8715
|
+
end
|
8716
|
+
end
|
8717
|
+
|
8718
|
+
# Single evaluation request.
|
8719
|
+
class GoogleCloudAiplatformV1EvaluationRequest
|
8720
|
+
include Google::Apis::Core::Hashable
|
8721
|
+
|
8722
|
+
# Optional. Responses from model under test and other baseline models for
|
8723
|
+
# comparison.
|
8724
|
+
# Corresponds to the JSON property `candidateResponses`
|
8725
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResponse>]
|
8726
|
+
attr_accessor :candidate_responses
|
8727
|
+
|
8728
|
+
# Responses from model or agent.
|
8729
|
+
# Corresponds to the JSON property `goldenResponse`
|
8730
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResponse]
|
8731
|
+
attr_accessor :golden_response
|
8732
|
+
|
8733
|
+
# Prompt to be evaluated.
|
8734
|
+
# Corresponds to the JSON property `prompt`
|
8735
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPrompt]
|
8736
|
+
attr_accessor :prompt
|
8737
|
+
|
8738
|
+
# Optional. Named groups of rubrics associated with this prompt. The key is a
|
8739
|
+
# user-defined name for the rubric group.
|
8740
|
+
# Corresponds to the JSON property `rubrics`
|
8741
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricGroup>]
|
8742
|
+
attr_accessor :rubrics
|
8743
|
+
|
8744
|
+
def initialize(**args)
|
8745
|
+
update!(**args)
|
8746
|
+
end
|
8747
|
+
|
8748
|
+
# Update properties of this object
|
8749
|
+
def update!(**args)
|
8750
|
+
@candidate_responses = args[:candidate_responses] if args.key?(:candidate_responses)
|
8751
|
+
@golden_response = args[:golden_response] if args.key?(:golden_response)
|
8752
|
+
@prompt = args[:prompt] if args.key?(:prompt)
|
8753
|
+
@rubrics = args[:rubrics] if args.key?(:rubrics)
|
8754
|
+
end
|
8755
|
+
end
|
8756
|
+
|
8757
|
+
# Evaluation result.
|
8758
|
+
class GoogleCloudAiplatformV1EvaluationResult
|
8759
|
+
include Google::Apis::Core::Hashable
|
8760
|
+
|
8761
|
+
# Optional. The results for the metric.
|
8762
|
+
# Corresponds to the JSON property `candidateResults`
|
8763
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CandidateResult>]
|
8764
|
+
attr_accessor :candidate_results
|
8765
|
+
|
8766
|
+
# Required. The request item that was evaluated. Format: projects/`project`/
|
8767
|
+
# locations/`location`/evaluationItems/`evaluation_item`
|
8768
|
+
# Corresponds to the JSON property `evaluationRequest`
|
8769
|
+
# @return [String]
|
8770
|
+
attr_accessor :evaluation_request
|
8771
|
+
|
8772
|
+
# Required. The evaluation run that was used to generate the result. Format:
|
8773
|
+
# projects/`project`/locations/`location`/evaluationRuns/`evaluation_run`
|
8774
|
+
# Corresponds to the JSON property `evaluationRun`
|
8775
|
+
# @return [String]
|
8776
|
+
attr_accessor :evaluation_run
|
8777
|
+
|
8778
|
+
# Optional. Metadata about the evaluation result.
|
8779
|
+
# Corresponds to the JSON property `metadata`
|
8780
|
+
# @return [Object]
|
8781
|
+
attr_accessor :metadata
|
8782
|
+
|
8783
|
+
# Required. The metric that was evaluated.
|
8784
|
+
# Corresponds to the JSON property `metric`
|
8785
|
+
# @return [String]
|
8786
|
+
attr_accessor :metric
|
8787
|
+
|
8788
|
+
# Single evaluation request.
|
8789
|
+
# Corresponds to the JSON property `request`
|
8790
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRequest]
|
8791
|
+
attr_accessor :request
|
8792
|
+
|
8793
|
+
def initialize(**args)
|
8794
|
+
update!(**args)
|
8795
|
+
end
|
8796
|
+
|
8797
|
+
# Update properties of this object
|
8798
|
+
def update!(**args)
|
8799
|
+
@candidate_results = args[:candidate_results] if args.key?(:candidate_results)
|
8800
|
+
@evaluation_request = args[:evaluation_request] if args.key?(:evaluation_request)
|
8801
|
+
@evaluation_run = args[:evaluation_run] if args.key?(:evaluation_run)
|
8802
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
8803
|
+
@metric = args[:metric] if args.key?(:metric)
|
8804
|
+
@request = args[:request] if args.key?(:request)
|
8805
|
+
end
|
8806
|
+
end
|
8807
|
+
|
8808
|
+
# The results of the evaluation run.
|
8809
|
+
class GoogleCloudAiplatformV1EvaluationResults
|
8810
|
+
include Google::Apis::Core::Hashable
|
8811
|
+
|
8812
|
+
# The evaluation set where item level results are stored.
|
8813
|
+
# Corresponds to the JSON property `evaluationSet`
|
8814
|
+
# @return [String]
|
8815
|
+
attr_accessor :evaluation_set
|
8816
|
+
|
8817
|
+
# The summary metrics for the evaluation run.
|
8818
|
+
# Corresponds to the JSON property `summaryMetrics`
|
8819
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SummaryMetrics]
|
8820
|
+
attr_accessor :summary_metrics
|
8821
|
+
|
8822
|
+
def initialize(**args)
|
8823
|
+
update!(**args)
|
8824
|
+
end
|
8825
|
+
|
8826
|
+
# Update properties of this object
|
8827
|
+
def update!(**args)
|
8828
|
+
@evaluation_set = args[:evaluation_set] if args.key?(:evaluation_set)
|
8829
|
+
@summary_metrics = args[:summary_metrics] if args.key?(:summary_metrics)
|
8830
|
+
end
|
8831
|
+
end
|
8832
|
+
|
8833
|
+
# Configuration for a rubric group to be generated/saved for evaluation.
|
8834
|
+
class GoogleCloudAiplatformV1EvaluationRubricConfig
|
8835
|
+
include Google::Apis::Core::Hashable
|
8836
|
+
|
8837
|
+
# Specification for a pre-defined metric.
|
8838
|
+
# Corresponds to the JSON property `predefinedRubricGenerationSpec`
|
8839
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
|
8840
|
+
attr_accessor :predefined_rubric_generation_spec
|
8841
|
+
|
8842
|
+
# Specification for how rubrics should be generated.
|
8843
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
8844
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec]
|
8845
|
+
attr_accessor :rubric_generation_spec
|
8846
|
+
|
8847
|
+
# Required. The key used to save the generated rubrics. If a generation spec is
|
8848
|
+
# provided, this key will be used for the name of the generated rubric group.
|
8849
|
+
# Otherwise, this key will be used to look up the existing rubric group on the
|
8850
|
+
# evaluation item. Note that if a rubric group key is specified on both a rubric
|
8851
|
+
# config and an evaluation metric, the key from the metric will be used to
|
8852
|
+
# select the rubrics for evaluation.
|
8853
|
+
# Corresponds to the JSON property `rubricGroupKey`
|
8854
|
+
# @return [String]
|
8855
|
+
attr_accessor :rubric_group_key
|
8856
|
+
|
8857
|
+
def initialize(**args)
|
8858
|
+
update!(**args)
|
8859
|
+
end
|
8860
|
+
|
8861
|
+
# Update properties of this object
|
8862
|
+
def update!(**args)
|
8863
|
+
@predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec)
|
8864
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
8865
|
+
@rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key)
|
8866
|
+
end
|
8867
|
+
end
|
8868
|
+
|
8869
|
+
# EvaluationRun is a resource that represents a single evaluation run, which
|
8870
|
+
# includes a set of prompts, model responses, evaluation configuration and the
|
8871
|
+
# resulting metrics.
|
8872
|
+
class GoogleCloudAiplatformV1EvaluationRun
|
8873
|
+
include Google::Apis::Core::Hashable
|
8874
|
+
|
8875
|
+
# Output only. Time when the evaluation run was completed.
|
8876
|
+
# Corresponds to the JSON property `completionTime`
|
8877
|
+
# @return [String]
|
8878
|
+
attr_accessor :completion_time
|
8879
|
+
|
8880
|
+
# Output only. Time when the evaluation run was created.
|
8881
|
+
# Corresponds to the JSON property `createTime`
|
8882
|
+
# @return [String]
|
8883
|
+
attr_accessor :create_time
|
8884
|
+
|
8885
|
+
# The data source for the evaluation run.
|
8886
|
+
# Corresponds to the JSON property `dataSource`
|
8887
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunDataSource]
|
8888
|
+
attr_accessor :data_source
|
8889
|
+
|
8890
|
+
# Required. The display name of the Evaluation Run.
|
8891
|
+
# Corresponds to the JSON property `displayName`
|
8892
|
+
# @return [String]
|
8893
|
+
attr_accessor :display_name
|
8894
|
+
|
8895
|
+
# The `Status` type defines a logical error model that is suitable for different
|
8896
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
8897
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
8898
|
+
# data: error code, error message, and error details. You can find out more
|
8899
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
8900
|
+
# //cloud.google.com/apis/design/errors).
|
8901
|
+
# Corresponds to the JSON property `error`
|
8902
|
+
# @return [Google::Apis::AiplatformV1::GoogleRpcStatus]
|
8903
|
+
attr_accessor :error
|
8904
|
+
|
8905
|
+
# The Evalution configuration used for the evaluation run.
|
8906
|
+
# Corresponds to the JSON property `evaluationConfig`
|
8907
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfig]
|
8908
|
+
attr_accessor :evaluation_config
|
8909
|
+
|
8910
|
+
# The results of the evaluation run.
|
8911
|
+
# Corresponds to the JSON property `evaluationResults`
|
8912
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationResults]
|
8913
|
+
attr_accessor :evaluation_results
|
8914
|
+
|
8915
|
+
# Output only. The specific evaluation set of the evaluation run. For runs with
|
8916
|
+
# an evaluation set input, this will be that same set. For runs with BigQuery
|
8917
|
+
# input, it's the sampled BigQuery dataset.
|
8918
|
+
# Corresponds to the JSON property `evaluationSetSnapshot`
|
8919
|
+
# @return [String]
|
8920
|
+
attr_accessor :evaluation_set_snapshot
|
8921
|
+
|
8922
|
+
# Optional. The candidate to inference config map for the evaluation run. The
|
8923
|
+
# candidate can be up to 128 characters long and can consist of any UTF-8
|
8924
|
+
# characters.
|
8925
|
+
# Corresponds to the JSON property `inferenceConfigs`
|
8926
|
+
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunInferenceConfig>]
|
8927
|
+
attr_accessor :inference_configs
|
8928
|
+
|
8929
|
+
# Optional. Labels for the evaluation run.
|
8930
|
+
# Corresponds to the JSON property `labels`
|
8931
|
+
# @return [Hash<String,String>]
|
8932
|
+
attr_accessor :labels
|
8933
|
+
|
8934
|
+
# Optional. Metadata about the evaluation run, can be used by the caller to
|
8935
|
+
# store additional tracking information about the evaluation run.
|
8936
|
+
# Corresponds to the JSON property `metadata`
|
8937
|
+
# @return [Object]
|
8938
|
+
attr_accessor :metadata
|
8939
|
+
|
8940
|
+
# Identifier. The resource name of the EvaluationRun. This is a unique
|
8941
|
+
# identifier. Format: `projects/`project`/locations/`location`/evaluationRuns/`
|
8942
|
+
# evaluation_run``
|
8943
|
+
# Corresponds to the JSON property `name`
|
8944
|
+
# @return [String]
|
8945
|
+
attr_accessor :name
|
8946
|
+
|
8947
|
+
# Output only. The state of the evaluation run.
|
8948
|
+
# Corresponds to the JSON property `state`
|
8949
|
+
# @return [String]
|
8950
|
+
attr_accessor :state
|
8951
|
+
|
8952
|
+
def initialize(**args)
|
8953
|
+
update!(**args)
|
8954
|
+
end
|
8955
|
+
|
8956
|
+
# Update properties of this object
|
8957
|
+
def update!(**args)
|
8958
|
+
@completion_time = args[:completion_time] if args.key?(:completion_time)
|
8959
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
8960
|
+
@data_source = args[:data_source] if args.key?(:data_source)
|
8961
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
8962
|
+
@error = args[:error] if args.key?(:error)
|
8963
|
+
@evaluation_config = args[:evaluation_config] if args.key?(:evaluation_config)
|
8964
|
+
@evaluation_results = args[:evaluation_results] if args.key?(:evaluation_results)
|
8965
|
+
@evaluation_set_snapshot = args[:evaluation_set_snapshot] if args.key?(:evaluation_set_snapshot)
|
8966
|
+
@inference_configs = args[:inference_configs] if args.key?(:inference_configs)
|
8967
|
+
@labels = args[:labels] if args.key?(:labels)
|
8968
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
8969
|
+
@name = args[:name] if args.key?(:name)
|
8970
|
+
@state = args[:state] if args.key?(:state)
|
8971
|
+
end
|
8972
|
+
end
|
8973
|
+
|
8974
|
+
# The data source for the evaluation run.
|
8975
|
+
class GoogleCloudAiplatformV1EvaluationRunDataSource
|
8976
|
+
include Google::Apis::Core::Hashable
|
8977
|
+
|
8978
|
+
# The request set for the evaluation run.
|
8979
|
+
# Corresponds to the JSON property `bigqueryRequestSet`
|
8980
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BigQueryRequestSet]
|
8981
|
+
attr_accessor :bigquery_request_set
|
8982
|
+
|
8983
|
+
# The EvaluationSet resource name. Format: `projects/`project`/locations/`
|
8984
|
+
# location`/evaluationSets/`evaluation_set``
|
8985
|
+
# Corresponds to the JSON property `evaluationSet`
|
8986
|
+
# @return [String]
|
8987
|
+
attr_accessor :evaluation_set
|
8988
|
+
|
8989
|
+
def initialize(**args)
|
8990
|
+
update!(**args)
|
8991
|
+
end
|
8992
|
+
|
8993
|
+
# Update properties of this object
|
8994
|
+
def update!(**args)
|
8995
|
+
@bigquery_request_set = args[:bigquery_request_set] if args.key?(:bigquery_request_set)
|
8996
|
+
@evaluation_set = args[:evaluation_set] if args.key?(:evaluation_set)
|
8997
|
+
end
|
8998
|
+
end
|
8999
|
+
|
9000
|
+
# The Evalution configuration used for the evaluation run.
|
9001
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfig
|
9002
|
+
include Google::Apis::Core::Hashable
|
9003
|
+
|
9004
|
+
# The autorater config used for the evaluation run.
|
9005
|
+
# Corresponds to the JSON property `autoraterConfig`
|
9006
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9007
|
+
attr_accessor :autorater_config
|
9008
|
+
|
9009
|
+
# Required. The metrics to be calculated in the evaluation run.
|
9010
|
+
# Corresponds to the JSON property `metrics`
|
9011
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetric>]
|
9012
|
+
attr_accessor :metrics
|
9013
|
+
|
9014
|
+
# The output config for the evaluation run.
|
9015
|
+
# Corresponds to the JSON property `outputConfig`
|
9016
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigOutputConfig]
|
9017
|
+
attr_accessor :output_config
|
9018
|
+
|
9019
|
+
# Prompt template used for inference.
|
9020
|
+
# Corresponds to the JSON property `promptTemplate`
|
9021
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigPromptTemplate]
|
9022
|
+
attr_accessor :prompt_template
|
9023
|
+
|
9024
|
+
# Optional. The rubric configs for the evaluation run. They are used to generate
|
9025
|
+
# rubrics which can be used by rubric-based metrics. Multiple rubric configs can
|
9026
|
+
# be specified for rubric generation but only one rubric config can be used for
|
9027
|
+
# a rubric-based metric. If more than one rubric config is provided, the
|
9028
|
+
# evaluation metric must specify a rubric group key. Note that if a generation
|
9029
|
+
# spec is specified on both a rubric config and an evaluation metric, the
|
9030
|
+
# rubrics generated for the metric will be used for evaluation.
|
9031
|
+
# Corresponds to the JSON property `rubricConfigs`
|
9032
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRubricConfig>]
|
9033
|
+
attr_accessor :rubric_configs
|
9034
|
+
|
9035
|
+
def initialize(**args)
|
9036
|
+
update!(**args)
|
9037
|
+
end
|
9038
|
+
|
9039
|
+
# Update properties of this object
|
9040
|
+
def update!(**args)
|
9041
|
+
@autorater_config = args[:autorater_config] if args.key?(:autorater_config)
|
9042
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
9043
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
9044
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
9045
|
+
@rubric_configs = args[:rubric_configs] if args.key?(:rubric_configs)
|
9046
|
+
end
|
9047
|
+
end
|
9048
|
+
|
9049
|
+
# The autorater config used for the evaluation run.
|
9050
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig
|
9051
|
+
include Google::Apis::Core::Hashable
|
9052
|
+
|
9053
|
+
# Optional. The fully qualified name of the publisher model or tuned autorater
|
9054
|
+
# endpoint to use. Publisher model format: `projects/`project`/locations/`
|
9055
|
+
# location`/publishers/*/models/*` Tuned model endpoint format: `projects/`
|
9056
|
+
# project`/locations/`location`/endpoints/`endpoint``
|
9057
|
+
# Corresponds to the JSON property `autoraterModel`
|
9058
|
+
# @return [String]
|
9059
|
+
attr_accessor :autorater_model
|
9060
|
+
|
9061
|
+
# Generation config.
|
9062
|
+
# Corresponds to the JSON property `generationConfig`
|
9063
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
|
9064
|
+
attr_accessor :generation_config
|
9065
|
+
|
9066
|
+
# Optional. Number of samples for each instance in the dataset. If not specified,
|
9067
|
+
# the default is 4. Minimum value is 1, maximum value is 32.
|
9068
|
+
# Corresponds to the JSON property `sampleCount`
|
9069
|
+
# @return [Fixnum]
|
9070
|
+
attr_accessor :sample_count
|
9071
|
+
|
9072
|
+
def initialize(**args)
|
9073
|
+
update!(**args)
|
9074
|
+
end
|
9075
|
+
|
9076
|
+
# Update properties of this object
|
9077
|
+
def update!(**args)
|
9078
|
+
@autorater_model = args[:autorater_model] if args.key?(:autorater_model)
|
9079
|
+
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
9080
|
+
@sample_count = args[:sample_count] if args.key?(:sample_count)
|
9081
|
+
end
|
9082
|
+
end
|
9083
|
+
|
9084
|
+
# The output config for the evaluation run.
|
9085
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfigOutputConfig
|
9086
|
+
include Google::Apis::Core::Hashable
|
9087
|
+
|
9088
|
+
# The BigQuery location for the output content.
|
9089
|
+
# Corresponds to the JSON property `bigqueryDestination`
|
9090
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BigQueryDestination]
|
9091
|
+
attr_accessor :bigquery_destination
|
9092
|
+
|
9093
|
+
# The Google Cloud Storage location where the output is to be written to.
|
9094
|
+
# Corresponds to the JSON property `gcsDestination`
|
9095
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GcsDestination]
|
9096
|
+
attr_accessor :gcs_destination
|
9097
|
+
|
9098
|
+
def initialize(**args)
|
9099
|
+
update!(**args)
|
9100
|
+
end
|
9101
|
+
|
9102
|
+
# Update properties of this object
|
9103
|
+
def update!(**args)
|
9104
|
+
@bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination)
|
9105
|
+
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
|
9106
|
+
end
|
9107
|
+
end
|
9108
|
+
|
9109
|
+
# Prompt template used for inference.
|
9110
|
+
class GoogleCloudAiplatformV1EvaluationRunEvaluationConfigPromptTemplate
|
9111
|
+
include Google::Apis::Core::Hashable
|
9112
|
+
|
9113
|
+
# Prompt template stored in Cloud Storage. Format: "gs://my-bucket/file-name.txt"
|
9114
|
+
# .
|
9115
|
+
# Corresponds to the JSON property `gcsUri`
|
9116
|
+
# @return [String]
|
9117
|
+
attr_accessor :gcs_uri
|
9118
|
+
|
9119
|
+
# Inline prompt template. Template variables should be in the format "`var_name`"
|
9120
|
+
# . Example: "Translate the following from `source_lang` to `target_lang`: `text`
|
9121
|
+
# "
|
9122
|
+
# Corresponds to the JSON property `promptTemplate`
|
9123
|
+
# @return [String]
|
9124
|
+
attr_accessor :prompt_template
|
9125
|
+
|
9126
|
+
def initialize(**args)
|
9127
|
+
update!(**args)
|
9128
|
+
end
|
9129
|
+
|
9130
|
+
# Update properties of this object
|
9131
|
+
def update!(**args)
|
9132
|
+
@gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
|
9133
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
9134
|
+
end
|
9135
|
+
end
|
9136
|
+
|
9137
|
+
# An inference config used for model inference during the evaluation run.
|
9138
|
+
class GoogleCloudAiplatformV1EvaluationRunInferenceConfig
|
9139
|
+
include Google::Apis::Core::Hashable
|
9140
|
+
|
9141
|
+
# Generation config.
|
9142
|
+
# Corresponds to the JSON property `generationConfig`
|
9143
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
|
9144
|
+
attr_accessor :generation_config
|
9145
|
+
|
9146
|
+
# Required. The fully qualified name of the publisher model or endpoint to use.
|
9147
|
+
# Publisher model format: `projects/`project`/locations/`location`/publishers/*/
|
9148
|
+
# models/*` Endpoint format: `projects/`project`/locations/`location`/endpoints/`
|
9149
|
+
# endpoint``
|
9150
|
+
# Corresponds to the JSON property `model`
|
9151
|
+
# @return [String]
|
9152
|
+
attr_accessor :model
|
9153
|
+
|
9154
|
+
def initialize(**args)
|
9155
|
+
update!(**args)
|
9156
|
+
end
|
9157
|
+
|
9158
|
+
# Update properties of this object
|
9159
|
+
def update!(**args)
|
9160
|
+
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
9161
|
+
@model = args[:model] if args.key?(:model)
|
9162
|
+
end
|
9163
|
+
end
|
9164
|
+
|
9165
|
+
# The metric used for evaluation runs.
|
9166
|
+
class GoogleCloudAiplatformV1EvaluationRunMetric
|
9167
|
+
include Google::Apis::Core::Hashable
|
9168
|
+
|
9169
|
+
# Specification for a computation based metric.
|
9170
|
+
# Corresponds to the JSON property `computationBasedMetricSpec`
|
9171
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricComputationBasedMetricSpec]
|
9172
|
+
attr_accessor :computation_based_metric_spec
|
9173
|
+
|
9174
|
+
# Specification for an LLM based metric.
|
9175
|
+
# Corresponds to the JSON property `llmBasedMetricSpec`
|
9176
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricLlmBasedMetricSpec]
|
9177
|
+
attr_accessor :llm_based_metric_spec
|
9178
|
+
|
9179
|
+
# Required. The name of the metric.
|
9180
|
+
# Corresponds to the JSON property `metric`
|
9181
|
+
# @return [String]
|
9182
|
+
attr_accessor :metric
|
9183
|
+
|
9184
|
+
# Specification for a pre-defined metric.
|
9185
|
+
# Corresponds to the JSON property `predefinedMetricSpec`
|
9186
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
|
9187
|
+
attr_accessor :predefined_metric_spec
|
9188
|
+
|
9189
|
+
# Specification for a metric that is based on rubrics.
|
9190
|
+
# Corresponds to the JSON property `rubricBasedMetricSpec`
|
9191
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpec]
|
9192
|
+
attr_accessor :rubric_based_metric_spec
|
9193
|
+
|
9194
|
+
def initialize(**args)
|
9195
|
+
update!(**args)
|
9196
|
+
end
|
9197
|
+
|
9198
|
+
# Update properties of this object
|
9199
|
+
def update!(**args)
|
9200
|
+
@computation_based_metric_spec = args[:computation_based_metric_spec] if args.key?(:computation_based_metric_spec)
|
9201
|
+
@llm_based_metric_spec = args[:llm_based_metric_spec] if args.key?(:llm_based_metric_spec)
|
9202
|
+
@metric = args[:metric] if args.key?(:metric)
|
9203
|
+
@predefined_metric_spec = args[:predefined_metric_spec] if args.key?(:predefined_metric_spec)
|
9204
|
+
@rubric_based_metric_spec = args[:rubric_based_metric_spec] if args.key?(:rubric_based_metric_spec)
|
9205
|
+
end
|
9206
|
+
end
|
9207
|
+
|
9208
|
+
# Specification for a computation based metric.
|
9209
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricComputationBasedMetricSpec
|
9210
|
+
include Google::Apis::Core::Hashable
|
9211
|
+
|
9212
|
+
# Optional. A map of parameters for the metric, e.g. `"rouge_type": "rougeL"`.
|
9213
|
+
# Corresponds to the JSON property `parameters`
|
9214
|
+
# @return [Hash<String,Object>]
|
9215
|
+
attr_accessor :parameters
|
9216
|
+
|
9217
|
+
# Required. The type of the computation based metric.
|
9218
|
+
# Corresponds to the JSON property `type`
|
9219
|
+
# @return [String]
|
9220
|
+
attr_accessor :type
|
9221
|
+
|
9222
|
+
def initialize(**args)
|
9223
|
+
update!(**args)
|
9224
|
+
end
|
9225
|
+
|
9226
|
+
# Update properties of this object
|
9227
|
+
def update!(**args)
|
9228
|
+
@parameters = args[:parameters] if args.key?(:parameters)
|
9229
|
+
@type = args[:type] if args.key?(:type)
|
9230
|
+
end
|
9231
|
+
end
|
9232
|
+
|
9233
|
+
# Specification for an LLM based metric.
|
9234
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricLlmBasedMetricSpec
|
9235
|
+
include Google::Apis::Core::Hashable
|
9236
|
+
|
9237
|
+
# Optional. Optional additional configuration for the metric.
|
9238
|
+
# Corresponds to the JSON property `additionalConfig`
|
9239
|
+
# @return [Hash<String,Object>]
|
9240
|
+
attr_accessor :additional_config
|
9241
|
+
|
9242
|
+
# The autorater config used for the evaluation run.
|
9243
|
+
# Corresponds to the JSON property `judgeAutoraterConfig`
|
9244
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9245
|
+
attr_accessor :judge_autorater_config
|
9246
|
+
|
9247
|
+
# Required. Template for the prompt sent to the judge model.
|
9248
|
+
# Corresponds to the JSON property `metricPromptTemplate`
|
9249
|
+
# @return [String]
|
9250
|
+
attr_accessor :metric_prompt_template
|
9251
|
+
|
9252
|
+
# Specification for a pre-defined metric.
|
9253
|
+
# Corresponds to the JSON property `predefinedRubricGenerationSpec`
|
9254
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
|
9255
|
+
attr_accessor :predefined_rubric_generation_spec
|
9256
|
+
|
9257
|
+
# Specification for how rubrics should be generated.
|
9258
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
9259
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec]
|
9260
|
+
attr_accessor :rubric_generation_spec
|
9261
|
+
|
9262
|
+
# Use a pre-defined group of rubrics associated with the input. Refers to a key
|
9263
|
+
# in the rubric_groups map of EvaluationInstance.
|
9264
|
+
# Corresponds to the JSON property `rubricGroupKey`
|
9265
|
+
# @return [String]
|
9266
|
+
attr_accessor :rubric_group_key
|
9267
|
+
|
9268
|
+
# Optional. System instructions for the judge model.
|
9269
|
+
# Corresponds to the JSON property `systemInstruction`
|
9270
|
+
# @return [String]
|
9271
|
+
attr_accessor :system_instruction
|
9272
|
+
|
9273
|
+
def initialize(**args)
|
9274
|
+
update!(**args)
|
9275
|
+
end
|
9276
|
+
|
9277
|
+
# Update properties of this object
|
9278
|
+
def update!(**args)
|
9279
|
+
@additional_config = args[:additional_config] if args.key?(:additional_config)
|
9280
|
+
@judge_autorater_config = args[:judge_autorater_config] if args.key?(:judge_autorater_config)
|
9281
|
+
@metric_prompt_template = args[:metric_prompt_template] if args.key?(:metric_prompt_template)
|
9282
|
+
@predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec)
|
9283
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
9284
|
+
@rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key)
|
9285
|
+
@system_instruction = args[:system_instruction] if args.key?(:system_instruction)
|
9286
|
+
end
|
9287
|
+
end
|
9288
|
+
|
9289
|
+
# Specification for a pre-defined metric.
|
9290
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec
|
9291
|
+
include Google::Apis::Core::Hashable
|
9292
|
+
|
9293
|
+
# Required. The name of a pre-defined metric, such as "instruction_following_v1"
|
9294
|
+
# or "text_quality_v1".
|
9295
|
+
# Corresponds to the JSON property `metricSpecName`
|
9296
|
+
# @return [String]
|
9297
|
+
attr_accessor :metric_spec_name
|
9298
|
+
|
9299
|
+
# Optional. The parameters needed to run the pre-defined metric.
|
9300
|
+
# Corresponds to the JSON property `parameters`
|
9301
|
+
# @return [Hash<String,Object>]
|
9302
|
+
attr_accessor :parameters
|
9303
|
+
|
9304
|
+
def initialize(**args)
|
9305
|
+
update!(**args)
|
9306
|
+
end
|
9307
|
+
|
9308
|
+
# Update properties of this object
|
9309
|
+
def update!(**args)
|
9310
|
+
@metric_spec_name = args[:metric_spec_name] if args.key?(:metric_spec_name)
|
9311
|
+
@parameters = args[:parameters] if args.key?(:parameters)
|
9312
|
+
end
|
9313
|
+
end
|
9314
|
+
|
9315
|
+
# Specification for a metric that is based on rubrics.
|
9316
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpec
|
9317
|
+
include Google::Apis::Core::Hashable
|
9318
|
+
|
9319
|
+
# Defines a list of rubrics, used when providing rubrics inline.
|
9320
|
+
# Corresponds to the JSON property `inlineRubrics`
|
9321
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpecRepeatedRubrics]
|
9322
|
+
attr_accessor :inline_rubrics
|
9323
|
+
|
9324
|
+
# The autorater config used for the evaluation run.
|
9325
|
+
# Corresponds to the JSON property `judgeAutoraterConfig`
|
9326
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9327
|
+
attr_accessor :judge_autorater_config
|
9328
|
+
|
9329
|
+
# Optional. Template for the prompt used by the judge model to evaluate against
|
9330
|
+
# rubrics.
|
9331
|
+
# Corresponds to the JSON property `metricPromptTemplate`
|
9332
|
+
# @return [String]
|
9333
|
+
attr_accessor :metric_prompt_template
|
9334
|
+
|
9335
|
+
# Specification for how rubrics should be generated.
|
9336
|
+
# Corresponds to the JSON property `rubricGenerationSpec`
|
9337
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec]
|
9338
|
+
attr_accessor :rubric_generation_spec
|
9339
|
+
|
9340
|
+
# Use a pre-defined group of rubrics associated with the input content. This
|
9341
|
+
# refers to a key in the `rubric_groups` map of `RubricEnhancedContents`.
|
9342
|
+
# Corresponds to the JSON property `rubricGroupKey`
|
9343
|
+
# @return [String]
|
9344
|
+
attr_accessor :rubric_group_key
|
9345
|
+
|
9346
|
+
def initialize(**args)
|
9347
|
+
update!(**args)
|
9348
|
+
end
|
9349
|
+
|
9350
|
+
# Update properties of this object
|
9351
|
+
def update!(**args)
|
9352
|
+
@inline_rubrics = args[:inline_rubrics] if args.key?(:inline_rubrics)
|
9353
|
+
@judge_autorater_config = args[:judge_autorater_config] if args.key?(:judge_autorater_config)
|
9354
|
+
@metric_prompt_template = args[:metric_prompt_template] if args.key?(:metric_prompt_template)
|
9355
|
+
@rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
|
9356
|
+
@rubric_group_key = args[:rubric_group_key] if args.key?(:rubric_group_key)
|
9357
|
+
end
|
9358
|
+
end
|
9359
|
+
|
9360
|
+
# Defines a list of rubrics, used when providing rubrics inline.
|
9361
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricRubricBasedMetricSpecRepeatedRubrics
|
9362
|
+
include Google::Apis::Core::Hashable
|
9363
|
+
|
9364
|
+
# The list of rubrics.
|
9365
|
+
# Corresponds to the JSON property `rubrics`
|
9366
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Rubric>]
|
9367
|
+
attr_accessor :rubrics
|
9368
|
+
|
9369
|
+
def initialize(**args)
|
9370
|
+
update!(**args)
|
9371
|
+
end
|
9372
|
+
|
9373
|
+
# Update properties of this object
|
9374
|
+
def update!(**args)
|
9375
|
+
@rubrics = args[:rubrics] if args.key?(:rubrics)
|
9376
|
+
end
|
9377
|
+
end
|
9378
|
+
|
9379
|
+
# Specification for how rubrics should be generated.
|
9380
|
+
class GoogleCloudAiplatformV1EvaluationRunMetricRubricGenerationSpec
|
9381
|
+
include Google::Apis::Core::Hashable
|
9382
|
+
|
9383
|
+
# The autorater config used for the evaluation run.
|
9384
|
+
# Corresponds to the JSON property `modelConfig`
|
9385
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunEvaluationConfigAutoraterConfig]
|
9386
|
+
attr_accessor :model_config
|
9387
|
+
|
9388
|
+
# Optional. Template for the prompt used to generate rubrics. The details should
|
9389
|
+
# be updated based on the most-recent recipe requirements.
|
9390
|
+
# Corresponds to the JSON property `promptTemplate`
|
9391
|
+
# @return [String]
|
9392
|
+
attr_accessor :prompt_template
|
9393
|
+
|
9394
|
+
# Optional. The type of rubric content to be generated.
|
9395
|
+
# Corresponds to the JSON property `rubricContentType`
|
9396
|
+
# @return [String]
|
9397
|
+
attr_accessor :rubric_content_type
|
9398
|
+
|
9399
|
+
# Optional. An optional, pre-defined list of allowed types for generated rubrics.
|
9400
|
+
# If this field is provided, it implies `include_rubric_type` should be true,
|
9401
|
+
# and the generated rubric types should be chosen from this ontology.
|
9402
|
+
# Corresponds to the JSON property `rubricTypeOntology`
|
9403
|
+
# @return [Array<String>]
|
9404
|
+
attr_accessor :rubric_type_ontology
|
9405
|
+
|
9406
|
+
def initialize(**args)
|
9407
|
+
update!(**args)
|
9408
|
+
end
|
9409
|
+
|
9410
|
+
# Update properties of this object
|
9411
|
+
def update!(**args)
|
9412
|
+
@model_config = args[:model_config] if args.key?(:model_config)
|
9413
|
+
@prompt_template = args[:prompt_template] if args.key?(:prompt_template)
|
9414
|
+
@rubric_content_type = args[:rubric_content_type] if args.key?(:rubric_content_type)
|
9415
|
+
@rubric_type_ontology = args[:rubric_type_ontology] if args.key?(:rubric_type_ontology)
|
9416
|
+
end
|
9417
|
+
end
|
9418
|
+
|
9419
|
+
# EvaluationSet is a collection of related EvaluationItems that are evaluated
|
9420
|
+
# together.
|
9421
|
+
class GoogleCloudAiplatformV1EvaluationSet
|
9422
|
+
include Google::Apis::Core::Hashable
|
9423
|
+
|
9424
|
+
# Output only. Timestamp when this item was created.
|
9425
|
+
# Corresponds to the JSON property `createTime`
|
9426
|
+
# @return [String]
|
9427
|
+
attr_accessor :create_time
|
9428
|
+
|
9429
|
+
# Required. The display name of the EvaluationSet.
|
9430
|
+
# Corresponds to the JSON property `displayName`
|
9431
|
+
# @return [String]
|
9432
|
+
attr_accessor :display_name
|
9433
|
+
|
9434
|
+
# Required. The EvaluationItems that are part of this dataset.
|
9435
|
+
# Corresponds to the JSON property `evaluationItems`
|
9436
|
+
# @return [Array<String>]
|
9437
|
+
attr_accessor :evaluation_items
|
9438
|
+
|
9439
|
+
# Optional. Metadata for the EvaluationSet.
|
9440
|
+
# Corresponds to the JSON property `metadata`
|
9441
|
+
# @return [Object]
|
9442
|
+
attr_accessor :metadata
|
9443
|
+
|
9444
|
+
# Identifier. The resource name of the EvaluationSet. Format: `projects/`project`
|
9445
|
+
# /locations/`location`/evaluationSets/`evaluation_set``
|
9446
|
+
# Corresponds to the JSON property `name`
|
9447
|
+
# @return [String]
|
9448
|
+
attr_accessor :name
|
9449
|
+
|
9450
|
+
# Output only. Timestamp when this item was last updated.
|
9451
|
+
# Corresponds to the JSON property `updateTime`
|
9452
|
+
# @return [String]
|
9453
|
+
attr_accessor :update_time
|
9454
|
+
|
9455
|
+
def initialize(**args)
|
9456
|
+
update!(**args)
|
9457
|
+
end
|
9458
|
+
|
9459
|
+
# Update properties of this object
|
9460
|
+
def update!(**args)
|
9461
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
9462
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
9463
|
+
@evaluation_items = args[:evaluation_items] if args.key?(:evaluation_items)
|
9464
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
9465
|
+
@name = args[:name] if args.key?(:name)
|
9466
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
9467
|
+
end
|
9468
|
+
end
|
9469
|
+
|
8413
9470
|
# An edge describing the relationship between an Artifact and an Execution in a
|
8414
9471
|
# lineage graph.
|
8415
9472
|
class GoogleCloudAiplatformV1Event
|
@@ -13170,6 +14227,64 @@ module Google
|
|
13170
14227
|
end
|
13171
14228
|
end
|
13172
14229
|
|
14230
|
+
# Request message for DataFoundryService.GenerateSyntheticData.
|
14231
|
+
class GoogleCloudAiplatformV1GenerateSyntheticDataRequest
|
14232
|
+
include Google::Apis::Core::Hashable
|
14233
|
+
|
14234
|
+
# Required. The number of synthetic examples to generate. For this stateless API,
|
14235
|
+
# the count is limited to a small number.
|
14236
|
+
# Corresponds to the JSON property `count`
|
14237
|
+
# @return [Fixnum]
|
14238
|
+
attr_accessor :count
|
14239
|
+
|
14240
|
+
# Optional. A list of few-shot examples to guide the model's output style and
|
14241
|
+
# format.
|
14242
|
+
# Corresponds to the JSON property `examples`
|
14243
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SyntheticExample>]
|
14244
|
+
attr_accessor :examples
|
14245
|
+
|
14246
|
+
# Required. The schema of the desired output, defined by a list of fields.
|
14247
|
+
# Corresponds to the JSON property `outputFieldSpecs`
|
14248
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1OutputFieldSpec>]
|
14249
|
+
attr_accessor :output_field_specs
|
14250
|
+
|
14251
|
+
# Defines a generation strategy based on a high-level task description.
|
14252
|
+
# Corresponds to the JSON property `taskDescription`
|
14253
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1TaskDescriptionStrategy]
|
14254
|
+
attr_accessor :task_description
|
14255
|
+
|
14256
|
+
def initialize(**args)
|
14257
|
+
update!(**args)
|
14258
|
+
end
|
14259
|
+
|
14260
|
+
# Update properties of this object
|
14261
|
+
def update!(**args)
|
14262
|
+
@count = args[:count] if args.key?(:count)
|
14263
|
+
@examples = args[:examples] if args.key?(:examples)
|
14264
|
+
@output_field_specs = args[:output_field_specs] if args.key?(:output_field_specs)
|
14265
|
+
@task_description = args[:task_description] if args.key?(:task_description)
|
14266
|
+
end
|
14267
|
+
end
|
14268
|
+
|
14269
|
+
# The response containing the generated data.
|
14270
|
+
class GoogleCloudAiplatformV1GenerateSyntheticDataResponse
|
14271
|
+
include Google::Apis::Core::Hashable
|
14272
|
+
|
14273
|
+
# A list of generated synthetic examples.
|
14274
|
+
# Corresponds to the JSON property `syntheticExamples`
|
14275
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SyntheticExample>]
|
14276
|
+
attr_accessor :synthetic_examples
|
14277
|
+
|
14278
|
+
def initialize(**args)
|
14279
|
+
update!(**args)
|
14280
|
+
end
|
14281
|
+
|
14282
|
+
# Update properties of this object
|
14283
|
+
def update!(**args)
|
14284
|
+
@synthetic_examples = args[:synthetic_examples] if args.key?(:synthetic_examples)
|
14285
|
+
end
|
14286
|
+
end
|
14287
|
+
|
13173
14288
|
# Generate video response.
|
13174
14289
|
class GoogleCloudAiplatformV1GenerateVideoResponse
|
13175
14290
|
include Google::Apis::Core::Hashable
|
@@ -15856,6 +16971,81 @@ module Google
|
|
15856
16971
|
end
|
15857
16972
|
end
|
15858
16973
|
|
16974
|
+
# Response message for EvaluationManagementService.ListEvaluationItems.
|
16975
|
+
class GoogleCloudAiplatformV1ListEvaluationItemsResponse
|
16976
|
+
include Google::Apis::Core::Hashable
|
16977
|
+
|
16978
|
+
# List of EvaluationItems in the requested page.
|
16979
|
+
# Corresponds to the JSON property `evaluationItems`
|
16980
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationItem>]
|
16981
|
+
attr_accessor :evaluation_items
|
16982
|
+
|
16983
|
+
# A token to retrieve the next page of results.
|
16984
|
+
# Corresponds to the JSON property `nextPageToken`
|
16985
|
+
# @return [String]
|
16986
|
+
attr_accessor :next_page_token
|
16987
|
+
|
16988
|
+
def initialize(**args)
|
16989
|
+
update!(**args)
|
16990
|
+
end
|
16991
|
+
|
16992
|
+
# Update properties of this object
|
16993
|
+
def update!(**args)
|
16994
|
+
@evaluation_items = args[:evaluation_items] if args.key?(:evaluation_items)
|
16995
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
16996
|
+
end
|
16997
|
+
end
|
16998
|
+
|
16999
|
+
# Response message for EvaluationManagementService.ListEvaluationRuns.
|
17000
|
+
class GoogleCloudAiplatformV1ListEvaluationRunsResponse
|
17001
|
+
include Google::Apis::Core::Hashable
|
17002
|
+
|
17003
|
+
# List of EvaluationRuns in the requested page.
|
17004
|
+
# Corresponds to the JSON property `evaluationRuns`
|
17005
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRun>]
|
17006
|
+
attr_accessor :evaluation_runs
|
17007
|
+
|
17008
|
+
# A token to retrieve the next page of results.
|
17009
|
+
# Corresponds to the JSON property `nextPageToken`
|
17010
|
+
# @return [String]
|
17011
|
+
attr_accessor :next_page_token
|
17012
|
+
|
17013
|
+
def initialize(**args)
|
17014
|
+
update!(**args)
|
17015
|
+
end
|
17016
|
+
|
17017
|
+
# Update properties of this object
|
17018
|
+
def update!(**args)
|
17019
|
+
@evaluation_runs = args[:evaluation_runs] if args.key?(:evaluation_runs)
|
17020
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
17021
|
+
end
|
17022
|
+
end
|
17023
|
+
|
17024
|
+
# Response message for EvaluationManagementService.ListEvaluationSets.
|
17025
|
+
class GoogleCloudAiplatformV1ListEvaluationSetsResponse
|
17026
|
+
include Google::Apis::Core::Hashable
|
17027
|
+
|
17028
|
+
# List of EvaluationSets in the requested page.
|
17029
|
+
# Corresponds to the JSON property `evaluationSets`
|
17030
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationSet>]
|
17031
|
+
attr_accessor :evaluation_sets
|
17032
|
+
|
17033
|
+
# A token to retrieve the next page of results.
|
17034
|
+
# Corresponds to the JSON property `nextPageToken`
|
17035
|
+
# @return [String]
|
17036
|
+
attr_accessor :next_page_token
|
17037
|
+
|
17038
|
+
def initialize(**args)
|
17039
|
+
update!(**args)
|
17040
|
+
end
|
17041
|
+
|
17042
|
+
# Update properties of this object
|
17043
|
+
def update!(**args)
|
17044
|
+
@evaluation_sets = args[:evaluation_sets] if args.key?(:evaluation_sets)
|
17045
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
17046
|
+
end
|
17047
|
+
end
|
17048
|
+
|
15859
17049
|
# Response message for MetadataService.ListExecutions.
|
15860
17050
|
class GoogleCloudAiplatformV1ListExecutionsResponse
|
15861
17051
|
include Google::Apis::Core::Hashable
|
@@ -17385,18 +18575,28 @@ module Google
|
|
17385
18575
|
class GoogleCloudAiplatformV1MetricResult
|
17386
18576
|
include Google::Apis::Core::Hashable
|
17387
18577
|
|
17388
|
-
# The
|
18578
|
+
# The `Status` type defines a logical error model that is suitable for different
|
18579
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
18580
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
18581
|
+
# data: error code, error message, and error details. You can find out more
|
18582
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
18583
|
+
# //cloud.google.com/apis/design/errors).
|
18584
|
+
# Corresponds to the JSON property `error`
|
18585
|
+
# @return [Google::Apis::AiplatformV1::GoogleRpcStatus]
|
18586
|
+
attr_accessor :error
|
18587
|
+
|
18588
|
+
# Output only. The explanation for the metric result.
|
17389
18589
|
# Corresponds to the JSON property `explanation`
|
17390
18590
|
# @return [String]
|
17391
18591
|
attr_accessor :explanation
|
17392
18592
|
|
17393
|
-
# For rubric-based metrics, the verdicts for each rubric.
|
18593
|
+
# Output only. For rubric-based metrics, the verdicts for each rubric.
|
17394
18594
|
# Corresponds to the JSON property `rubricVerdicts`
|
17395
18595
|
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RubricVerdict>]
|
17396
18596
|
attr_accessor :rubric_verdicts
|
17397
18597
|
|
17398
|
-
# The score for the metric. Please refer to each metric's
|
17399
|
-
# meaning of the score.
|
18598
|
+
# Output only. The score for the metric. Please refer to each metric's
|
18599
|
+
# documentation for the meaning of the score.
|
17400
18600
|
# Corresponds to the JSON property `score`
|
17401
18601
|
# @return [Float]
|
17402
18602
|
attr_accessor :score
|
@@ -17407,6 +18607,7 @@ module Google
|
|
17407
18607
|
|
17408
18608
|
# Update properties of this object
|
17409
18609
|
def update!(**args)
|
18610
|
+
@error = args[:error] if args.key?(:error)
|
17410
18611
|
@explanation = args[:explanation] if args.key?(:explanation)
|
17411
18612
|
@rubric_verdicts = args[:rubric_verdicts] if args.key?(:rubric_verdicts)
|
17412
18613
|
@score = args[:score] if args.key?(:score)
|
@@ -21603,6 +22804,40 @@ module Google
|
|
21603
22804
|
end
|
21604
22805
|
end
|
21605
22806
|
|
22807
|
+
# Defines a specification for a single output field.
|
22808
|
+
class GoogleCloudAiplatformV1OutputFieldSpec
|
22809
|
+
include Google::Apis::Core::Hashable
|
22810
|
+
|
22811
|
+
# Required. The name of the output field.
|
22812
|
+
# Corresponds to the JSON property `fieldName`
|
22813
|
+
# @return [String]
|
22814
|
+
attr_accessor :field_name
|
22815
|
+
|
22816
|
+
# Optional. The data type of the field. Defaults to CONTENT if not set.
|
22817
|
+
# Corresponds to the JSON property `fieldType`
|
22818
|
+
# @return [String]
|
22819
|
+
attr_accessor :field_type
|
22820
|
+
|
22821
|
+
# Optional. Optional, but recommended. Additional guidance specific to this
|
22822
|
+
# field to provide targeted instructions for the LLM to generate the content of
|
22823
|
+
# a single output field. While the LLM can sometimes infer content from the
|
22824
|
+
# field name, providing explicit guidance is preferred.
|
22825
|
+
# Corresponds to the JSON property `guidance`
|
22826
|
+
# @return [String]
|
22827
|
+
attr_accessor :guidance
|
22828
|
+
|
22829
|
+
def initialize(**args)
|
22830
|
+
update!(**args)
|
22831
|
+
end
|
22832
|
+
|
22833
|
+
# Update properties of this object
|
22834
|
+
def update!(**args)
|
22835
|
+
@field_name = args[:field_name] if args.key?(:field_name)
|
22836
|
+
@field_type = args[:field_type] if args.key?(:field_type)
|
22837
|
+
@guidance = args[:guidance] if args.key?(:guidance)
|
22838
|
+
end
|
22839
|
+
end
|
22840
|
+
|
21606
22841
|
# PSC config that is used to automatically create PSC endpoints in the user
|
21607
22842
|
# projects.
|
21608
22843
|
class GoogleCloudAiplatformV1PscAutomationConfig
|
@@ -26532,6 +27767,11 @@ module Google
|
|
26532
27767
|
# @return [String]
|
26533
27768
|
attr_accessor :etag
|
26534
27769
|
|
27770
|
+
# Labels for the ReasoningEngine.
|
27771
|
+
# Corresponds to the JSON property `labels`
|
27772
|
+
# @return [Hash<String,String>]
|
27773
|
+
attr_accessor :labels
|
27774
|
+
|
26535
27775
|
# Identifier. The resource name of the ReasoningEngine. Format: `projects/`
|
26536
27776
|
# project`/locations/`location`/reasoningEngines/`reasoning_engine``
|
26537
27777
|
# Corresponds to the JSON property `name`
|
@@ -26559,6 +27799,7 @@ module Google
|
|
26559
27799
|
@display_name = args[:display_name] if args.key?(:display_name)
|
26560
27800
|
@encryption_spec = args[:encryption_spec] if args.key?(:encryption_spec)
|
26561
27801
|
@etag = args[:etag] if args.key?(:etag)
|
27802
|
+
@labels = args[:labels] if args.key?(:labels)
|
26562
27803
|
@name = args[:name] if args.key?(:name)
|
26563
27804
|
@spec = args[:spec] if args.key?(:spec)
|
26564
27805
|
@update_time = args[:update_time] if args.key?(:update_time)
|
@@ -37495,6 +38736,37 @@ module Google
|
|
37495
38736
|
end
|
37496
38737
|
end
|
37497
38738
|
|
38739
|
+
# The summary metrics for the evaluation run.
|
38740
|
+
class GoogleCloudAiplatformV1SummaryMetrics
|
38741
|
+
include Google::Apis::Core::Hashable
|
38742
|
+
|
38743
|
+
# Optional. The number of items that failed to be evaluated.
|
38744
|
+
# Corresponds to the JSON property `failedItems`
|
38745
|
+
# @return [Fixnum]
|
38746
|
+
attr_accessor :failed_items
|
38747
|
+
|
38748
|
+
# Optional. Map of metric name to metric value.
|
38749
|
+
# Corresponds to the JSON property `metrics`
|
38750
|
+
# @return [Hash<String,Object>]
|
38751
|
+
attr_accessor :metrics
|
38752
|
+
|
38753
|
+
# Optional. The total number of items that were evaluated.
|
38754
|
+
# Corresponds to the JSON property `totalItems`
|
38755
|
+
# @return [Fixnum]
|
38756
|
+
attr_accessor :total_items
|
38757
|
+
|
38758
|
+
def initialize(**args)
|
38759
|
+
update!(**args)
|
38760
|
+
end
|
38761
|
+
|
38762
|
+
# Update properties of this object
|
38763
|
+
def update!(**args)
|
38764
|
+
@failed_items = args[:failed_items] if args.key?(:failed_items)
|
38765
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
38766
|
+
@total_items = args[:total_items] if args.key?(:total_items)
|
38767
|
+
end
|
38768
|
+
end
|
38769
|
+
|
37498
38770
|
# Hyperparameters for SFT.
|
37499
38771
|
class GoogleCloudAiplatformV1SupervisedHyperParameters
|
37500
38772
|
include Google::Apis::Core::Hashable
|
@@ -37794,6 +39066,55 @@ module Google
|
|
37794
39066
|
end
|
37795
39067
|
end
|
37796
39068
|
|
39069
|
+
# Represents a single synthetic example, composed of multiple fields. Used for
|
39070
|
+
# providing few-shot examples in the request and for returning generated
|
39071
|
+
# examples in the response.
|
39072
|
+
class GoogleCloudAiplatformV1SyntheticExample
|
39073
|
+
include Google::Apis::Core::Hashable
|
39074
|
+
|
39075
|
+
# Required. A list of fields that constitute an example.
|
39076
|
+
# Corresponds to the JSON property `fields`
|
39077
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SyntheticField>]
|
39078
|
+
attr_accessor :fields
|
39079
|
+
|
39080
|
+
def initialize(**args)
|
39081
|
+
update!(**args)
|
39082
|
+
end
|
39083
|
+
|
39084
|
+
# Update properties of this object
|
39085
|
+
def update!(**args)
|
39086
|
+
@fields = args[:fields] if args.key?(:fields)
|
39087
|
+
end
|
39088
|
+
end
|
39089
|
+
|
39090
|
+
# Represents a single named field within a SyntheticExample.
|
39091
|
+
class GoogleCloudAiplatformV1SyntheticField
|
39092
|
+
include Google::Apis::Core::Hashable
|
39093
|
+
|
39094
|
+
# The base structured datatype containing multi-part content of a message. A `
|
39095
|
+
# Content` includes a `role` field designating the producer of the `Content` and
|
39096
|
+
# a `parts` field containing multi-part data that contains the content of the
|
39097
|
+
# message turn.
|
39098
|
+
# Corresponds to the JSON property `content`
|
39099
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content]
|
39100
|
+
attr_accessor :content
|
39101
|
+
|
39102
|
+
# Optional. The name of the field.
|
39103
|
+
# Corresponds to the JSON property `fieldName`
|
39104
|
+
# @return [String]
|
39105
|
+
attr_accessor :field_name
|
39106
|
+
|
39107
|
+
def initialize(**args)
|
39108
|
+
update!(**args)
|
39109
|
+
end
|
39110
|
+
|
39111
|
+
# Update properties of this object
|
39112
|
+
def update!(**args)
|
39113
|
+
@content = args[:content] if args.key?(:content)
|
39114
|
+
@field_name = args[:field_name] if args.key?(:field_name)
|
39115
|
+
end
|
39116
|
+
end
|
39117
|
+
|
37797
39118
|
# The storage details for TFRecord output content.
|
37798
39119
|
class GoogleCloudAiplatformV1TfRecordDestination
|
37799
39120
|
include Google::Apis::Core::Hashable
|
@@ -37813,6 +39134,25 @@ module Google
|
|
37813
39134
|
end
|
37814
39135
|
end
|
37815
39136
|
|
39137
|
+
# Defines a generation strategy based on a high-level task description.
|
39138
|
+
class GoogleCloudAiplatformV1TaskDescriptionStrategy
|
39139
|
+
include Google::Apis::Core::Hashable
|
39140
|
+
|
39141
|
+
# Required. A high-level description of the synthetic data to be generated.
|
39142
|
+
# Corresponds to the JSON property `taskDescription`
|
39143
|
+
# @return [String]
|
39144
|
+
attr_accessor :task_description
|
39145
|
+
|
39146
|
+
def initialize(**args)
|
39147
|
+
update!(**args)
|
39148
|
+
end
|
39149
|
+
|
39150
|
+
# Update properties of this object
|
39151
|
+
def update!(**args)
|
39152
|
+
@task_description = args[:task_description] if args.key?(:task_description)
|
39153
|
+
end
|
39154
|
+
end
|
39155
|
+
|
37816
39156
|
# A tensor value type.
|
37817
39157
|
class GoogleCloudAiplatformV1Tensor
|
37818
39158
|
include Google::Apis::Core::Hashable
|