@maxim_mazurok/gapi.client.aiplatform-v1 0.0.20250820 → 0.2.20250820

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.
Files changed (3) hide show
  1. package/index.d.ts +165 -1
  2. package/package.json +1 -1
  3. package/readme.md +2 -0
package/index.d.ts CHANGED
@@ -1789,6 +1789,10 @@ declare namespace gapi.client {
1789
1789
  fulfillmentInput?: GoogleCloudAiplatformV1FulfillmentInput;
1790
1790
  /** Input for groundedness metric. */
1791
1791
  groundednessInput?: GoogleCloudAiplatformV1GroundednessInput;
1792
+ /** The instance to be evaluated. */
1793
+ instance?: GoogleCloudAiplatformV1EvaluationInstance;
1794
+ /** The metrics used for evaluation. Currently, we only support evaluating a single metric. If multiple metrics are provided, only the first one will be evaluated. */
1795
+ metrics?: GoogleCloudAiplatformV1Metric[];
1792
1796
  /** Input for Metricx metric. */
1793
1797
  metricxInput?: GoogleCloudAiplatformV1MetricxInput;
1794
1798
  /** Input for pairwise metric. */
@@ -1855,6 +1859,8 @@ declare namespace gapi.client {
1855
1859
  fulfillmentResult?: GoogleCloudAiplatformV1FulfillmentResult;
1856
1860
  /** Result for groundedness metric. */
1857
1861
  groundednessResult?: GoogleCloudAiplatformV1GroundednessResult;
1862
+ /** Metric results for each instance. The order of the metric results is guaranteed to be the same as the order of the instances in the request. */
1863
+ metricResults?: GoogleCloudAiplatformV1MetricResult[];
1858
1864
  /** Result for Metricx metric. */
1859
1865
  metricxResult?: GoogleCloudAiplatformV1MetricxResult;
1860
1866
  /** Result for pairwise metric. */
@@ -1912,6 +1918,34 @@ declare namespace gapi.client {
1912
1918
  /** Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported. */
1913
1919
  gcsSource?: GoogleCloudAiplatformV1GcsSource;
1914
1920
  }
1921
+ interface GoogleCloudAiplatformV1EvaluationInstance {
1922
+ /** Optional. Other data used to populate placeholders based on their key. */
1923
+ otherData?: GoogleCloudAiplatformV1EvaluationInstanceMapInstance;
1924
+ /** Optional. Data used to populate placeholder `prompt` in a metric prompt template. */
1925
+ prompt?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData;
1926
+ /** Optional. Data used to populate placeholder `reference` in a metric prompt template. */
1927
+ reference?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData;
1928
+ /** Required. Data used to populate placeholder `response` in a metric prompt template. */
1929
+ response?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData;
1930
+ /** Optional. Named groups of rubrics associated with the prompt. This is used for rubric-based evaluations where rubrics can be referenced by a key. The key could represent versions, associated metrics, etc. */
1931
+ rubricGroups?: {[P in string]: GoogleCloudAiplatformV1RubricGroup};
1932
+ }
1933
+ interface GoogleCloudAiplatformV1EvaluationInstanceInstanceData {
1934
+ /** List of Gemini content data. */
1935
+ contents?: GoogleCloudAiplatformV1EvaluationInstanceInstanceDataContents;
1936
+ /** Text data. */
1937
+ text?: string;
1938
+ }
1939
+ interface GoogleCloudAiplatformV1EvaluationInstanceInstanceDataContents {
1940
+ /** Optional. Repeated contents. */
1941
+ contents?: GoogleCloudAiplatformV1Content[];
1942
+ }
1943
+ interface GoogleCloudAiplatformV1EvaluationInstanceMapInstance {
1944
+ /** Optional. Map of instance data. */
1945
+ mapInstance?: {
1946
+ [P in string]: GoogleCloudAiplatformV1EvaluationInstanceInstanceData;
1947
+ };
1948
+ }
1915
1949
  interface GoogleCloudAiplatformV1Event {
1916
1950
  /** Required. The relative resource name of the Artifact in the Event. */
1917
1951
  artifact?: string;
@@ -2970,6 +3004,18 @@ declare namespace gapi.client {
2970
3004
  /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
2971
3005
  trafficType?: string;
2972
3006
  }
3007
+ interface GoogleCloudAiplatformV1GenerateInstanceRubricsRequest {
3008
+ /** Required. The prompt to generate rubrics from. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. */
3009
+ contents?: GoogleCloudAiplatformV1Content[];
3010
+ /** Optional. Specification for using the rubric generation configs of a pre-defined metric, e.g. "generic_quality_v1" and "instruction_following_v1". Some of the configs may be only used in rubric generation and not supporting evaluation, e.g. "fully_customized_generic_quality_v1". If this field is set, the `rubric_generation_spec` field will be ignored. */
3011
+ predefinedRubricGenerationSpec?: GoogleCloudAiplatformV1PredefinedMetricSpec;
3012
+ /** Optional. Specification for how the rubrics should be generated. */
3013
+ rubricGenerationSpec?: GoogleCloudAiplatformV1RubricGenerationSpec;
3014
+ }
3015
+ interface GoogleCloudAiplatformV1GenerateInstanceRubricsResponse {
3016
+ /** Output only. A list of generated rubrics. */
3017
+ generatedRubrics?: GoogleCloudAiplatformV1Rubric[];
3018
+ }
2973
3019
  interface GoogleCloudAiplatformV1GenerateVideoResponse {
2974
3020
  /** The cloud storage uris of the generated videos. */
2975
3021
  generatedSamples?: string[];
@@ -3954,9 +4000,19 @@ declare namespace gapi.client {
3954
4000
  pairwiseMetricSpec?: GoogleCloudAiplatformV1PairwiseMetricSpec;
3955
4001
  /** Spec for pointwise metric. */
3956
4002
  pointwiseMetricSpec?: GoogleCloudAiplatformV1PointwiseMetricSpec;
4003
+ /** The spec for a pre-defined metric. */
4004
+ predefinedMetricSpec?: GoogleCloudAiplatformV1PredefinedMetricSpec;
3957
4005
  /** Spec for rouge metric. */
3958
4006
  rougeSpec?: GoogleCloudAiplatformV1RougeSpec;
3959
4007
  }
4008
+ interface GoogleCloudAiplatformV1MetricResult {
4009
+ /** The explanation for the metric result. */
4010
+ explanation?: string;
4011
+ /** For rubric-based metrics, the verdicts for each rubric. */
4012
+ rubricVerdicts?: GoogleCloudAiplatformV1RubricVerdict[];
4013
+ /** The score for the metric. Please refer to each metric's documentation for the meaning of the score. */
4014
+ score?: number;
4015
+ }
3960
4016
  interface GoogleCloudAiplatformV1MetricxInput {
3961
4017
  /** Required. Metricx instance. */
3962
4018
  instance?: GoogleCloudAiplatformV1MetricxInstance;
@@ -5290,6 +5346,12 @@ declare namespace gapi.client {
5290
5346
  /** The name of the preset voice to use. */
5291
5347
  voiceName?: string;
5292
5348
  }
5349
+ interface GoogleCloudAiplatformV1PredefinedMetricSpec {
5350
+ /** Required. The name of a pre-defined metric, such as "instruction_following_v1" or "text_quality_v1". */
5351
+ metricSpecName?: string;
5352
+ /** Optional. The parameters needed to run the pre-defined metric. */
5353
+ metricSpecParameters?: {[P in string]: any};
5354
+ }
5293
5355
  interface GoogleCloudAiplatformV1PredefinedSplit {
5294
5356
  /** Required. The key is a name of one of the Dataset's data columns. The value of the key (either the label's value or value in the column) must be one of {`training`, `validation`, `test`}, and it defines to which set the given piece of data is assigned. If for a piece of data the key is not present or has an invalid value, that piece is ignored by the pipeline. */
5295
5357
  key?: string;
@@ -6296,6 +6358,16 @@ declare namespace gapi.client {
6296
6358
  /** Optional. Whether to use stemmer to compute rouge score. */
6297
6359
  useStemmer?: boolean;
6298
6360
  }
6361
+ interface GoogleCloudAiplatformV1Rubric {
6362
+ /** Required. The actual testable criteria for the rubric. */
6363
+ content?: GoogleCloudAiplatformV1RubricContent;
6364
+ /** Optional. The relative importance of this rubric. */
6365
+ importance?: string;
6366
+ /** Unique identifier for the rubric. This ID is used to refer to this rubric, e.g., in RubricVerdict. */
6367
+ rubricId?: string;
6368
+ /** Optional. A type designator for the rubric, which can inform how it's evaluated or interpreted by systems or users. It's recommended to use consistent, well-defined, upper snake_case strings. Examples: "SUMMARIZATION_QUALITY", "SAFETY_HARMFUL_CONTENT", "INSTRUCTION_ADHERENCE". */
6369
+ type?: string;
6370
+ }
6299
6371
  interface GoogleCloudAiplatformV1RubricBasedInstructionFollowingInput {
6300
6372
  /** Required. Instance for RubricBasedInstructionFollowing metric. */
6301
6373
  instance?: GoogleCloudAiplatformV1RubricBasedInstructionFollowingInstance;
@@ -6313,12 +6385,46 @@ declare namespace gapi.client {
6313
6385
  score?: number;
6314
6386
  }
6315
6387
  interface GoogleCloudAiplatformV1RubricBasedInstructionFollowingSpec {}
6388
+ interface GoogleCloudAiplatformV1RubricContent {
6389
+ /** Evaluation criteria based on a specific property. */
6390
+ property?: GoogleCloudAiplatformV1RubricContentProperty;
6391
+ }
6392
+ interface GoogleCloudAiplatformV1RubricContentProperty {
6393
+ /** Description of the property being evaluated. Example: "The model's response is grammatically correct." */
6394
+ description?: string;
6395
+ }
6316
6396
  interface GoogleCloudAiplatformV1RubricCritiqueResult {
6317
6397
  /** Output only. Rubric to be evaluated. */
6318
6398
  rubric?: string;
6319
6399
  /** Output only. Verdict for the rubric - true if the rubric is met, false otherwise. */
6320
6400
  verdict?: boolean;
6321
6401
  }
6402
+ interface GoogleCloudAiplatformV1RubricGenerationSpec {
6403
+ /** Configuration for the model used in rubric generation. Configs including sampling count and base model can be specified here. Flipping is not supported for rubric generation. */
6404
+ modelConfig?: GoogleCloudAiplatformV1AutoraterConfig;
6405
+ /** Template for the prompt used to generate rubrics. The details should be updated based on the most-recent recipe requirements. */
6406
+ promptTemplate?: string;
6407
+ /** The type of rubric content to be generated. */
6408
+ rubricContentType?: string;
6409
+ /** Optional. An optional, pre-defined list of allowed types for generated rubrics. If this field is provided, it implies `include_rubric_type` should be true, and the generated rubric types should be chosen from this ontology. */
6410
+ rubricTypeOntology?: string[];
6411
+ }
6412
+ interface GoogleCloudAiplatformV1RubricGroup {
6413
+ /** Human-readable name for the group. This should be unique within a given context if used for display or selection. Example: "Instruction Following V1", "Content Quality - Summarization Task". */
6414
+ displayName?: string;
6415
+ /** Unique identifier for the group. */
6416
+ groupId?: string;
6417
+ /** Rubrics that are part of this group. */
6418
+ rubrics?: GoogleCloudAiplatformV1Rubric[];
6419
+ }
6420
+ interface GoogleCloudAiplatformV1RubricVerdict {
6421
+ /** Required. The full rubric definition that was evaluated. Storing this ensures the verdict is self-contained and understandable, especially if the original rubric definition changes or was dynamically generated. */
6422
+ evaluatedRubric?: GoogleCloudAiplatformV1Rubric;
6423
+ /** Optional. Human-readable reasoning or explanation for the verdict. This can include specific examples or details from the evaluated content that justify the given verdict. */
6424
+ reasoning?: string;
6425
+ /** Required. Outcome of the evaluation against the rubric, represented as a boolean. `true` indicates a "Pass", `false` indicates a "Fail". */
6426
+ verdict?: boolean;
6427
+ }
6322
6428
  interface GoogleCloudAiplatformV1SafetyInput {
6323
6429
  /** Required. Safety instance. */
6324
6430
  instance?: GoogleCloudAiplatformV1SafetyInstance;
@@ -33343,6 +33449,64 @@ declare namespace gapi.client {
33343
33449
  },
33344
33450
  body: GoogleCloudAiplatformV1EvaluateInstancesRequest,
33345
33451
  ): Request<GoogleCloudAiplatformV1EvaluateInstancesResponse>;
33452
+ /** Generates rubrics for a given prompt. A rubric represents a single testable criterion for evaluation. One input prompt could have multiple rubrics This RPC allows users to get suggested rubrics based on provided prompt, which can then be reviewed and used for subsequent evaluations. */
33453
+ generateInstanceRubrics(request: {
33454
+ /** V1 error format. */
33455
+ '$.xgafv'?: string;
33456
+ /** OAuth access token. */
33457
+ access_token?: string;
33458
+ /** Data format for response. */
33459
+ alt?: string;
33460
+ /** JSONP */
33461
+ callback?: string;
33462
+ /** Selector specifying which fields to include in a partial response. */
33463
+ fields?: string;
33464
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
33465
+ key?: string;
33466
+ /** Required. The resource name of the Location to generate rubrics from. Format: `projects/{project}/locations/{location}` */
33467
+ location: string;
33468
+ /** OAuth 2.0 token for the current user. */
33469
+ oauth_token?: string;
33470
+ /** Returns response with indentations and line breaks. */
33471
+ prettyPrint?: boolean;
33472
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
33473
+ quotaUser?: string;
33474
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
33475
+ upload_protocol?: string;
33476
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
33477
+ uploadType?: string;
33478
+ /** Request body */
33479
+ resource: GoogleCloudAiplatformV1GenerateInstanceRubricsRequest;
33480
+ }): Request<GoogleCloudAiplatformV1GenerateInstanceRubricsResponse>;
33481
+ generateInstanceRubrics(
33482
+ request: {
33483
+ /** V1 error format. */
33484
+ '$.xgafv'?: string;
33485
+ /** OAuth access token. */
33486
+ access_token?: string;
33487
+ /** Data format for response. */
33488
+ alt?: string;
33489
+ /** JSONP */
33490
+ callback?: string;
33491
+ /** Selector specifying which fields to include in a partial response. */
33492
+ fields?: string;
33493
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
33494
+ key?: string;
33495
+ /** Required. The resource name of the Location to generate rubrics from. Format: `projects/{project}/locations/{location}` */
33496
+ location: string;
33497
+ /** OAuth 2.0 token for the current user. */
33498
+ oauth_token?: string;
33499
+ /** Returns response with indentations and line breaks. */
33500
+ prettyPrint?: boolean;
33501
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
33502
+ quotaUser?: string;
33503
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
33504
+ upload_protocol?: string;
33505
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
33506
+ uploadType?: string;
33507
+ },
33508
+ body: GoogleCloudAiplatformV1GenerateInstanceRubricsRequest,
33509
+ ): Request<GoogleCloudAiplatformV1GenerateInstanceRubricsResponse>;
33346
33510
  /** Gets information about a location. */
33347
33511
  get(request?: {
33348
33512
  /** V1 error format. */
@@ -33407,7 +33571,7 @@ declare namespace gapi.client {
33407
33571
  alt?: string;
33408
33572
  /** JSONP */
33409
33573
  callback?: string;
33410
- /** Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations. */
33574
+ /** Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. */
33411
33575
  extraLocationTypes?: string | string[];
33412
33576
  /** Selector specifying which fields to include in a partial response. */
33413
33577
  fields?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.aiplatform-v1",
3
- "version": "0.0.20250820",
3
+ "version": "0.2.20250820",
4
4
  "description": "TypeScript typings for Vertex AI API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -201,3 +201,5 @@ Streams queries using a reasoning engine.
201
201
  */
202
202
  await gapi.client.aiplatform.reasoningEngines.streamQuery({name: 'name'});
203
203
  ```
204
+
205
+ For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.aiplatform-v1#Provenance:~:text=none-,Provenance,-Built%20and%20signed)