@maxim_mazurok/gapi.client.aiplatform-v1beta1 0.0.20231101 → 0.0.20231107
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.
- package/index.d.ts +195 -6
- package/package.json +1 -1
- package/tests.ts +26 -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:
|
|
12
|
+
// Revision: 20231107
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -775,6 +775,22 @@ declare namespace gapi.client {
|
|
|
775
775
|
successfulForecastPointCount?:
|
|
776
776
|
string;
|
|
777
777
|
}
|
|
778
|
+
interface GoogleCloudAiplatformV1beta1ComputeTokensRequest {
|
|
779
|
+
/**
|
|
780
|
+
* Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat
|
|
781
|
+
* models, or Codey models.
|
|
782
|
+
*/
|
|
783
|
+
instances?:
|
|
784
|
+
any[];
|
|
785
|
+
}
|
|
786
|
+
interface GoogleCloudAiplatformV1beta1ComputeTokensResponse {
|
|
787
|
+
/**
|
|
788
|
+
* Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request
|
|
789
|
+
* with multiple instances.
|
|
790
|
+
*/
|
|
791
|
+
tokensInfo?:
|
|
792
|
+
GoogleCloudAiplatformV1beta1TokensInfo[];
|
|
793
|
+
}
|
|
778
794
|
interface GoogleCloudAiplatformV1beta1ContainerRegistryDestination {
|
|
779
795
|
/**
|
|
780
796
|
* Required. Container Registry URI of a container image. Only Google Container Registry and Artifact Registry are supported now. Accepted forms: * Google Container Registry path. For
|
|
@@ -1517,11 +1533,11 @@ declare namespace gapi.client {
|
|
|
1517
1533
|
createTime?:
|
|
1518
1534
|
string;
|
|
1519
1535
|
/**
|
|
1520
|
-
* Optional. A description of resources that are dedicated to the DeployedIndex, and that need a higher degree of manual configuration.
|
|
1521
|
-
* value
|
|
1522
|
-
* machine types for SMALL shard: e2-standard-2 and all machine types available for MEDIUM and LARGE shard. Available machine types for
|
|
1523
|
-
* types available for LARGE shard. Available machine types for LARGE shard: e2-highmem-16, n2d-standard-32. n1-standard-16 and
|
|
1524
|
-
* e2-standard-16 and e2-highmem-16 for cost efficiency.
|
|
1536
|
+
* Optional. A description of resources that are dedicated to the DeployedIndex, and that need a higher degree of manual configuration. The field min_replica_count must be set to a
|
|
1537
|
+
* value strictly greater than 0, or else validation will fail. We don't provide SLA when min_replica_count=1. If max_replica_count is not set, the default value is min_replica_count.
|
|
1538
|
+
* The max allowed replica count is 1000. Available machine types for SMALL shard: e2-standard-2 and all machine types available for MEDIUM and LARGE shard. Available machine types for
|
|
1539
|
+
* MEDIUM shard: e2-standard-16 and all machine types available for LARGE shard. Available machine types for LARGE shard: e2-highmem-16, n2d-standard-32. n1-standard-16 and
|
|
1540
|
+
* n1-standard-32 are still available, but we recommend e2-standard-16 and e2-highmem-16 for cost efficiency.
|
|
1525
1541
|
*/
|
|
1526
1542
|
dedicatedResources?:
|
|
1527
1543
|
GoogleCloudAiplatformV1beta1DedicatedResources;
|
|
@@ -6375,6 +6391,9 @@ declare namespace gapi.client {
|
|
|
6375
6391
|
/** Required. The type of the event. */
|
|
6376
6392
|
eventType?:
|
|
6377
6393
|
string;
|
|
6394
|
+
/** Optional. The error details of the event. */
|
|
6395
|
+
status?:
|
|
6396
|
+
GoogleRpcStatus;
|
|
6378
6397
|
/** Required. The VM identity token (a JWT) for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity */
|
|
6379
6398
|
vmToken?:
|
|
6380
6399
|
string;
|
|
@@ -9627,6 +9646,14 @@ declare namespace gapi.client {
|
|
|
9627
9646
|
validationFraction?:
|
|
9628
9647
|
number;
|
|
9629
9648
|
}
|
|
9649
|
+
interface GoogleCloudAiplatformV1beta1TokensInfo {
|
|
9650
|
+
/** A list of token ids from the input. */
|
|
9651
|
+
tokenIds?:
|
|
9652
|
+
string[];
|
|
9653
|
+
/** A list of tokens from the input. */
|
|
9654
|
+
tokens?:
|
|
9655
|
+
string[];
|
|
9656
|
+
}
|
|
9630
9657
|
interface GoogleCloudAiplatformV1beta1TrainingConfig {
|
|
9631
9658
|
/** The timeout hours for the CMLE training job, expressed in milli hours i.e. 1,000 value in this field means 1 hour. */
|
|
9632
9659
|
timeoutTrainingMilliHours?:
|
|
@@ -14801,6 +14828,87 @@ declare namespace gapi.client {
|
|
|
14801
14828
|
}): Request<GoogleLongrunningOperation>;
|
|
14802
14829
|
}
|
|
14803
14830
|
interface EndpointsResource {
|
|
14831
|
+
/** Return a list of tokens based on the input text. */
|
|
14832
|
+
computeTokens(request: {
|
|
14833
|
+
/** V1 error format. */
|
|
14834
|
+
"$.xgafv"?:
|
|
14835
|
+
string;
|
|
14836
|
+
/** OAuth access token. */
|
|
14837
|
+
access_token?:
|
|
14838
|
+
string;
|
|
14839
|
+
/** Data format for response. */
|
|
14840
|
+
alt?:
|
|
14841
|
+
string;
|
|
14842
|
+
/** JSONP */
|
|
14843
|
+
callback?:
|
|
14844
|
+
string;
|
|
14845
|
+
/** Required. The name of the Endpoint requested to get lists of tokens and token ids. */
|
|
14846
|
+
endpoint:
|
|
14847
|
+
string;
|
|
14848
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
14849
|
+
fields?:
|
|
14850
|
+
string;
|
|
14851
|
+
/** 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. */
|
|
14852
|
+
key?:
|
|
14853
|
+
string;
|
|
14854
|
+
/** OAuth 2.0 token for the current user. */
|
|
14855
|
+
oauth_token?:
|
|
14856
|
+
string;
|
|
14857
|
+
/** Returns response with indentations and line breaks. */
|
|
14858
|
+
prettyPrint?:
|
|
14859
|
+
boolean;
|
|
14860
|
+
/** 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. */
|
|
14861
|
+
quotaUser?:
|
|
14862
|
+
string;
|
|
14863
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
14864
|
+
upload_protocol?:
|
|
14865
|
+
string;
|
|
14866
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
14867
|
+
uploadType?:
|
|
14868
|
+
string;
|
|
14869
|
+
/** Request body */
|
|
14870
|
+
resource:
|
|
14871
|
+
GoogleCloudAiplatformV1beta1ComputeTokensRequest;
|
|
14872
|
+
}): Request<GoogleCloudAiplatformV1beta1ComputeTokensResponse>;
|
|
14873
|
+
computeTokens(request: {
|
|
14874
|
+
/** V1 error format. */
|
|
14875
|
+
"$.xgafv"?:
|
|
14876
|
+
string;
|
|
14877
|
+
/** OAuth access token. */
|
|
14878
|
+
access_token?:
|
|
14879
|
+
string;
|
|
14880
|
+
/** Data format for response. */
|
|
14881
|
+
alt?:
|
|
14882
|
+
string;
|
|
14883
|
+
/** JSONP */
|
|
14884
|
+
callback?:
|
|
14885
|
+
string;
|
|
14886
|
+
/** Required. The name of the Endpoint requested to get lists of tokens and token ids. */
|
|
14887
|
+
endpoint:
|
|
14888
|
+
string;
|
|
14889
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
14890
|
+
fields?:
|
|
14891
|
+
string;
|
|
14892
|
+
/** 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. */
|
|
14893
|
+
key?:
|
|
14894
|
+
string;
|
|
14895
|
+
/** OAuth 2.0 token for the current user. */
|
|
14896
|
+
oauth_token?:
|
|
14897
|
+
string;
|
|
14898
|
+
/** Returns response with indentations and line breaks. */
|
|
14899
|
+
prettyPrint?:
|
|
14900
|
+
boolean;
|
|
14901
|
+
/** 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. */
|
|
14902
|
+
quotaUser?:
|
|
14903
|
+
string;
|
|
14904
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
14905
|
+
upload_protocol?:
|
|
14906
|
+
string;
|
|
14907
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
14908
|
+
uploadType?:
|
|
14909
|
+
string;
|
|
14910
|
+
},
|
|
14911
|
+
body: GoogleCloudAiplatformV1beta1ComputeTokensRequest): Request<GoogleCloudAiplatformV1beta1ComputeTokensResponse>;
|
|
14804
14912
|
/** Perform a token counting. */
|
|
14805
14913
|
countTokens(request: {
|
|
14806
14914
|
/** V1 error format. */
|
|
@@ -32169,6 +32277,87 @@ declare namespace gapi.client {
|
|
|
32169
32277
|
OperationsResource;
|
|
32170
32278
|
}
|
|
32171
32279
|
interface ModelsResource {
|
|
32280
|
+
/** Return a list of tokens based on the input text. */
|
|
32281
|
+
computeTokens(request: {
|
|
32282
|
+
/** V1 error format. */
|
|
32283
|
+
"$.xgafv"?:
|
|
32284
|
+
string;
|
|
32285
|
+
/** OAuth access token. */
|
|
32286
|
+
access_token?:
|
|
32287
|
+
string;
|
|
32288
|
+
/** Data format for response. */
|
|
32289
|
+
alt?:
|
|
32290
|
+
string;
|
|
32291
|
+
/** JSONP */
|
|
32292
|
+
callback?:
|
|
32293
|
+
string;
|
|
32294
|
+
/** Required. The name of the Endpoint requested to get lists of tokens and token ids. */
|
|
32295
|
+
endpoint:
|
|
32296
|
+
string;
|
|
32297
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
32298
|
+
fields?:
|
|
32299
|
+
string;
|
|
32300
|
+
/** 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. */
|
|
32301
|
+
key?:
|
|
32302
|
+
string;
|
|
32303
|
+
/** OAuth 2.0 token for the current user. */
|
|
32304
|
+
oauth_token?:
|
|
32305
|
+
string;
|
|
32306
|
+
/** Returns response with indentations and line breaks. */
|
|
32307
|
+
prettyPrint?:
|
|
32308
|
+
boolean;
|
|
32309
|
+
/** 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. */
|
|
32310
|
+
quotaUser?:
|
|
32311
|
+
string;
|
|
32312
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
32313
|
+
upload_protocol?:
|
|
32314
|
+
string;
|
|
32315
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
32316
|
+
uploadType?:
|
|
32317
|
+
string;
|
|
32318
|
+
/** Request body */
|
|
32319
|
+
resource:
|
|
32320
|
+
GoogleCloudAiplatformV1beta1ComputeTokensRequest;
|
|
32321
|
+
}): Request<GoogleCloudAiplatformV1beta1ComputeTokensResponse>;
|
|
32322
|
+
computeTokens(request: {
|
|
32323
|
+
/** V1 error format. */
|
|
32324
|
+
"$.xgafv"?:
|
|
32325
|
+
string;
|
|
32326
|
+
/** OAuth access token. */
|
|
32327
|
+
access_token?:
|
|
32328
|
+
string;
|
|
32329
|
+
/** Data format for response. */
|
|
32330
|
+
alt?:
|
|
32331
|
+
string;
|
|
32332
|
+
/** JSONP */
|
|
32333
|
+
callback?:
|
|
32334
|
+
string;
|
|
32335
|
+
/** Required. The name of the Endpoint requested to get lists of tokens and token ids. */
|
|
32336
|
+
endpoint:
|
|
32337
|
+
string;
|
|
32338
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
32339
|
+
fields?:
|
|
32340
|
+
string;
|
|
32341
|
+
/** 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. */
|
|
32342
|
+
key?:
|
|
32343
|
+
string;
|
|
32344
|
+
/** OAuth 2.0 token for the current user. */
|
|
32345
|
+
oauth_token?:
|
|
32346
|
+
string;
|
|
32347
|
+
/** Returns response with indentations and line breaks. */
|
|
32348
|
+
prettyPrint?:
|
|
32349
|
+
boolean;
|
|
32350
|
+
/** 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. */
|
|
32351
|
+
quotaUser?:
|
|
32352
|
+
string;
|
|
32353
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
32354
|
+
upload_protocol?:
|
|
32355
|
+
string;
|
|
32356
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
32357
|
+
uploadType?:
|
|
32358
|
+
string;
|
|
32359
|
+
},
|
|
32360
|
+
body: GoogleCloudAiplatformV1beta1ComputeTokensRequest): Request<GoogleCloudAiplatformV1beta1ComputeTokensResponse>;
|
|
32172
32361
|
/** Perform a token counting. */
|
|
32173
32362
|
countTokens(request: {
|
|
32174
32363
|
/** V1 error format. */
|
package/package.json
CHANGED
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:
|
|
6
|
+
// Revision: 20231107
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -1234,6 +1234,14 @@ gapi.load('client', async () => {
|
|
|
1234
1234
|
name: "Test string",
|
|
1235
1235
|
timeout: "Test string",
|
|
1236
1236
|
});
|
|
1237
|
+
/** Return a list of tokens based on the input text. */
|
|
1238
|
+
await gapi.client.aiplatform.projects.locations.endpoints.computeTokens({
|
|
1239
|
+
endpoint: "Test string",
|
|
1240
|
+
}, {
|
|
1241
|
+
instances: [
|
|
1242
|
+
42
|
|
1243
|
+
],
|
|
1244
|
+
});
|
|
1237
1245
|
/** Perform a token counting. */
|
|
1238
1246
|
await gapi.client.aiplatform.projects.locations.endpoints.countTokens({
|
|
1239
1247
|
endpoint: "Test string",
|
|
@@ -6593,6 +6601,15 @@ gapi.load('client', async () => {
|
|
|
6593
6601
|
name: "Test string",
|
|
6594
6602
|
}, {
|
|
6595
6603
|
eventType: "Test string",
|
|
6604
|
+
status: {
|
|
6605
|
+
code: 42,
|
|
6606
|
+
details: [
|
|
6607
|
+
{
|
|
6608
|
+
A: 42
|
|
6609
|
+
}
|
|
6610
|
+
],
|
|
6611
|
+
message: "Test string",
|
|
6612
|
+
},
|
|
6596
6613
|
vmToken: "Test string",
|
|
6597
6614
|
});
|
|
6598
6615
|
/** Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one. */
|
|
@@ -7274,6 +7291,14 @@ gapi.load('client', async () => {
|
|
|
7274
7291
|
name: "Test string",
|
|
7275
7292
|
timeout: "Test string",
|
|
7276
7293
|
});
|
|
7294
|
+
/** Return a list of tokens based on the input text. */
|
|
7295
|
+
await gapi.client.aiplatform.projects.locations.publishers.models.computeTokens({
|
|
7296
|
+
endpoint: "Test string",
|
|
7297
|
+
}, {
|
|
7298
|
+
instances: [
|
|
7299
|
+
42
|
|
7300
|
+
],
|
|
7301
|
+
});
|
|
7277
7302
|
/** Perform a token counting. */
|
|
7278
7303
|
await gapi.client.aiplatform.projects.locations.publishers.models.countTokens({
|
|
7279
7304
|
endpoint: "Test string",
|