@maxim_mazurok/gapi.client.aiplatform-v1beta1 0.0.20230721 → 0.0.20230808

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 +194 -8
  2. package/package.json +1 -1
  3. package/tests.ts +17 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://aiplatform.googleapis.com/$discovery/rest?version=v1beta1
12
- // Revision: 20230721
12
+ // Revision: 20230808
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -812,7 +812,7 @@ declare namespace gapi.client {
812
812
  /** Properties of the Context. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB. */
813
813
  metadata?:
814
814
  { [P in string]: any };
815
- /** Output only. The resource name of the Context. */
815
+ /** Immutable. The resource name of the Context. */
816
816
  name?:
817
817
  string;
818
818
  /** Output only. A list of resource names of Contexts that are parents of this Context. A Context may have at most 10 parent_contexts. */
@@ -864,6 +864,19 @@ declare namespace gapi.client {
864
864
  modelVersionId?:
865
865
  string;
866
866
  }
867
+ interface GoogleCloudAiplatformV1beta1CountTokensRequest {
868
+ /** Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model. */
869
+ instances?:
870
+ any[];
871
+ }
872
+ interface GoogleCloudAiplatformV1beta1CountTokensResponse {
873
+ /** The total number of billable characters counted across all instances from the request. */
874
+ totalBillableCharacters?:
875
+ number;
876
+ /** The total number of tokens counted across all instances from the request. */
877
+ totalTokens?:
878
+ number;
879
+ }
867
880
  interface GoogleCloudAiplatformV1beta1CreateDatasetOperationMetadata {
868
881
  /** The operation generic information. */
869
882
  genericMetadata?:
@@ -5050,7 +5063,7 @@ declare namespace gapi.client {
5050
5063
  */
5051
5064
  labels?:
5052
5065
  { [P in string]: string };
5053
- /** Output only. Resource name of a PersistentResource. */
5066
+ /** Immutable. Resource name of a PersistentResource. */
5054
5067
  name?:
5055
5068
  string;
5056
5069
  /**
@@ -5447,6 +5460,9 @@ declare namespace gapi.client {
5447
5460
  /** Required. Indicates the open source category of the publisher model. */
5448
5461
  openSourceCategory?:
5449
5462
  string;
5463
+ /** Optional. The parent that this model was customized from. E.g., Vision API, Natural Language API, LaMDA, T5, etc. Foundation models don't have parents. */
5464
+ parent?:
5465
+ GoogleCloudAiplatformV1beta1PublisherModelParent;
5450
5466
  /** Optional. The schemata that describes formats of the PublisherModel's predictions and explanations as given and returned via PredictionService.Predict. */
5451
5467
  predictSchemata?:
5452
5468
  GoogleCloudAiplatformV1beta1PredictSchemata;
@@ -5542,6 +5558,14 @@ declare namespace gapi.client {
5542
5558
  title?:
5543
5559
  string;
5544
5560
  }
5561
+ interface GoogleCloudAiplatformV1beta1PublisherModelParent {
5562
+ /** Required. The display name of the parent. E.g., LaMDA, T5, Vision API, Natural Language API. */
5563
+ displayName?:
5564
+ string;
5565
+ /** Optional. The Google Cloud resource name or the URI reference. */
5566
+ reference?:
5567
+ GoogleCloudAiplatformV1beta1PublisherModelResourceReference;
5568
+ }
5545
5569
  interface GoogleCloudAiplatformV1beta1PublisherModelResourceReference {
5546
5570
  /** The resource name of the Google Cloud resource. */
5547
5571
  resourceName?:
@@ -5999,7 +6023,7 @@ declare namespace gapi.client {
5999
6023
  */
6000
6024
  maxRunCount?:
6001
6025
  string;
6002
- /** Output only. The resource name of the Schedule. */
6026
+ /** Immutable. The resource name of the Schedule. */
6003
6027
  name?:
6004
6028
  string;
6005
6029
  /** Output only. Timestamp when this Schedule should schedule the next run. Having a next_run_time in the past means the runs are being started behind schedule. */
@@ -13824,6 +13848,87 @@ declare namespace gapi.client {
13824
13848
  }): Request<GoogleLongrunningOperation>;
13825
13849
  }
13826
13850
  interface EndpointsResource {
13851
+ /** Perform a token counting. */
13852
+ countTokens(request: {
13853
+ /** V1 error format. */
13854
+ "$.xgafv"?:
13855
+ string;
13856
+ /** OAuth access token. */
13857
+ access_token?:
13858
+ string;
13859
+ /** Data format for response. */
13860
+ alt?:
13861
+ string;
13862
+ /** JSONP */
13863
+ callback?:
13864
+ string;
13865
+ /** Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` */
13866
+ endpoint:
13867
+ string;
13868
+ /** Selector specifying which fields to include in a partial response. */
13869
+ fields?:
13870
+ string;
13871
+ /** 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. */
13872
+ key?:
13873
+ string;
13874
+ /** OAuth 2.0 token for the current user. */
13875
+ oauth_token?:
13876
+ string;
13877
+ /** Returns response with indentations and line breaks. */
13878
+ prettyPrint?:
13879
+ boolean;
13880
+ /** 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. */
13881
+ quotaUser?:
13882
+ string;
13883
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
13884
+ upload_protocol?:
13885
+ string;
13886
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
13887
+ uploadType?:
13888
+ string;
13889
+ /** Request body */
13890
+ resource:
13891
+ GoogleCloudAiplatformV1beta1CountTokensRequest;
13892
+ }): Request<GoogleCloudAiplatformV1beta1CountTokensResponse>;
13893
+ countTokens(request: {
13894
+ /** V1 error format. */
13895
+ "$.xgafv"?:
13896
+ string;
13897
+ /** OAuth access token. */
13898
+ access_token?:
13899
+ string;
13900
+ /** Data format for response. */
13901
+ alt?:
13902
+ string;
13903
+ /** JSONP */
13904
+ callback?:
13905
+ string;
13906
+ /** Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` */
13907
+ endpoint:
13908
+ string;
13909
+ /** Selector specifying which fields to include in a partial response. */
13910
+ fields?:
13911
+ string;
13912
+ /** 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. */
13913
+ key?:
13914
+ string;
13915
+ /** OAuth 2.0 token for the current user. */
13916
+ oauth_token?:
13917
+ string;
13918
+ /** Returns response with indentations and line breaks. */
13919
+ prettyPrint?:
13920
+ boolean;
13921
+ /** 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. */
13922
+ quotaUser?:
13923
+ string;
13924
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
13925
+ upload_protocol?:
13926
+ string;
13927
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
13928
+ uploadType?:
13929
+ string;
13930
+ },
13931
+ body: GoogleCloudAiplatformV1beta1CountTokensRequest): Request<GoogleCloudAiplatformV1beta1CountTokensResponse>;
13827
13932
  /** Creates an Endpoint. */
13828
13933
  create(request: {
13829
13934
  /** V1 error format. */
@@ -21805,7 +21910,7 @@ declare namespace gapi.client {
21805
21910
  /** 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. */
21806
21911
  key?:
21807
21912
  string;
21808
- /** Output only. The resource name of the Context. */
21913
+ /** Immutable. The resource name of the Context. */
21809
21914
  name:
21810
21915
  string;
21811
21916
  /** OAuth 2.0 token for the current user. */
@@ -21852,7 +21957,7 @@ declare namespace gapi.client {
21852
21957
  /** 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. */
21853
21958
  key?:
21854
21959
  string;
21855
- /** Output only. The resource name of the Context. */
21960
+ /** Immutable. The resource name of the Context. */
21856
21961
  name:
21857
21962
  string;
21858
21963
  /** OAuth 2.0 token for the current user. */
@@ -28666,6 +28771,87 @@ declare namespace gapi.client {
28666
28771
  OperationsResource;
28667
28772
  }
28668
28773
  interface ModelsResource {
28774
+ /** Perform a token counting. */
28775
+ countTokens(request: {
28776
+ /** V1 error format. */
28777
+ "$.xgafv"?:
28778
+ string;
28779
+ /** OAuth access token. */
28780
+ access_token?:
28781
+ string;
28782
+ /** Data format for response. */
28783
+ alt?:
28784
+ string;
28785
+ /** JSONP */
28786
+ callback?:
28787
+ string;
28788
+ /** Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` */
28789
+ endpoint:
28790
+ string;
28791
+ /** Selector specifying which fields to include in a partial response. */
28792
+ fields?:
28793
+ string;
28794
+ /** 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. */
28795
+ key?:
28796
+ string;
28797
+ /** OAuth 2.0 token for the current user. */
28798
+ oauth_token?:
28799
+ string;
28800
+ /** Returns response with indentations and line breaks. */
28801
+ prettyPrint?:
28802
+ boolean;
28803
+ /** 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. */
28804
+ quotaUser?:
28805
+ string;
28806
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
28807
+ upload_protocol?:
28808
+ string;
28809
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
28810
+ uploadType?:
28811
+ string;
28812
+ /** Request body */
28813
+ resource:
28814
+ GoogleCloudAiplatformV1beta1CountTokensRequest;
28815
+ }): Request<GoogleCloudAiplatformV1beta1CountTokensResponse>;
28816
+ countTokens(request: {
28817
+ /** V1 error format. */
28818
+ "$.xgafv"?:
28819
+ string;
28820
+ /** OAuth access token. */
28821
+ access_token?:
28822
+ string;
28823
+ /** Data format for response. */
28824
+ alt?:
28825
+ string;
28826
+ /** JSONP */
28827
+ callback?:
28828
+ string;
28829
+ /** Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` */
28830
+ endpoint:
28831
+ string;
28832
+ /** Selector specifying which fields to include in a partial response. */
28833
+ fields?:
28834
+ string;
28835
+ /** 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. */
28836
+ key?:
28837
+ string;
28838
+ /** OAuth 2.0 token for the current user. */
28839
+ oauth_token?:
28840
+ string;
28841
+ /** Returns response with indentations and line breaks. */
28842
+ prettyPrint?:
28843
+ boolean;
28844
+ /** 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. */
28845
+ quotaUser?:
28846
+ string;
28847
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
28848
+ upload_protocol?:
28849
+ string;
28850
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
28851
+ uploadType?:
28852
+ string;
28853
+ },
28854
+ body: GoogleCloudAiplatformV1beta1CountTokensRequest): Request<GoogleCloudAiplatformV1beta1CountTokensResponse>;
28669
28855
  /** Perform an online prediction. */
28670
28856
  predict(request: {
28671
28857
  /** V1 error format. */
@@ -29389,7 +29575,7 @@ declare namespace gapi.client {
29389
29575
  /** 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. */
29390
29576
  key?:
29391
29577
  string;
29392
- /** Output only. The resource name of the Schedule. */
29578
+ /** Immutable. The resource name of the Schedule. */
29393
29579
  name:
29394
29580
  string;
29395
29581
  /** OAuth 2.0 token for the current user. */
@@ -29433,7 +29619,7 @@ declare namespace gapi.client {
29433
29619
  /** 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. */
29434
29620
  key?:
29435
29621
  string;
29436
- /** Output only. The resource name of the Schedule. */
29622
+ /** Immutable. The resource name of the Schedule. */
29437
29623
  name:
29438
29624
  string;
29439
29625
  /** OAuth 2.0 token for the current user. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.aiplatform-v1beta1",
3
- "version": "0.0.20230721",
3
+ "version": "0.0.20230808",
4
4
  "description": "TypeScript typings for Vertex AI API v1beta1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230721
6
+ // Revision: 20230808
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -1197,6 +1197,14 @@ gapi.load('client', async () => {
1197
1197
  name: "Test string",
1198
1198
  timeout: "Test string",
1199
1199
  });
1200
+ /** Perform a token counting. */
1201
+ await gapi.client.aiplatform.projects.locations.endpoints.countTokens({
1202
+ endpoint: "Test string",
1203
+ }, {
1204
+ instances: [
1205
+ 42
1206
+ ],
1207
+ });
1200
1208
  /** Creates an Endpoint. */
1201
1209
  await gapi.client.aiplatform.projects.locations.endpoints.create({
1202
1210
  endpointId: "Test string",
@@ -6481,6 +6489,14 @@ gapi.load('client', async () => {
6481
6489
  name: "Test string",
6482
6490
  timeout: "Test string",
6483
6491
  });
6492
+ /** Perform a token counting. */
6493
+ await gapi.client.aiplatform.projects.locations.publishers.models.countTokens({
6494
+ endpoint: "Test string",
6495
+ }, {
6496
+ instances: [
6497
+ 42
6498
+ ],
6499
+ });
6484
6500
  /** Perform an online prediction. */
6485
6501
  await gapi.client.aiplatform.projects.locations.publishers.models.predict({
6486
6502
  endpoint: "Test string",