@google/genai 1.11.0 → 1.12.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.
- package/dist/genai.d.ts +18 -0
- package/dist/index.cjs +171 -19
- package/dist/index.mjs +171 -19
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +171 -19
- package/dist/node/index.mjs +171 -19
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +18 -0
- package/dist/web/index.mjs +171 -19
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +18 -0
- package/package.json +4 -4
package/dist/web/web.d.ts
CHANGED
|
@@ -1041,6 +1041,8 @@ export declare interface ComputeTokensParameters {
|
|
|
1041
1041
|
|
|
1042
1042
|
/** Response for computing tokens. */
|
|
1043
1043
|
export declare class ComputeTokensResponse {
|
|
1044
|
+
/** Used to retain the full HTTP response. */
|
|
1045
|
+
sdkHttpResponse?: HttpResponse;
|
|
1044
1046
|
/** 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 with multiple instances. */
|
|
1045
1047
|
tokensInfo?: TokensInfo[];
|
|
1046
1048
|
}
|
|
@@ -1168,6 +1170,8 @@ export declare interface CountTokensParameters {
|
|
|
1168
1170
|
|
|
1169
1171
|
/** Response for counting tokens. */
|
|
1170
1172
|
export declare class CountTokensResponse {
|
|
1173
|
+
/** Used to retain the full HTTP response. */
|
|
1174
|
+
sdkHttpResponse?: HttpResponse;
|
|
1171
1175
|
/** Total number of tokens. */
|
|
1172
1176
|
totalTokens?: number;
|
|
1173
1177
|
/** Number of tokens in the cached part of the prompt (the cached content). */
|
|
@@ -1771,6 +1775,8 @@ export declare interface EditImageParameters {
|
|
|
1771
1775
|
|
|
1772
1776
|
/** Response for the request to edit an image. */
|
|
1773
1777
|
export declare class EditImageResponse {
|
|
1778
|
+
/** Used to retain the full HTTP response. */
|
|
1779
|
+
sdkHttpResponse?: HttpResponse;
|
|
1774
1780
|
/** Generated images. */
|
|
1775
1781
|
generatedImages?: GeneratedImage[];
|
|
1776
1782
|
}
|
|
@@ -1844,6 +1850,8 @@ export declare interface EmbedContentParameters {
|
|
|
1844
1850
|
|
|
1845
1851
|
/** Response for the embed_content method. */
|
|
1846
1852
|
export declare class EmbedContentResponse {
|
|
1853
|
+
/** Used to retain the full HTTP response. */
|
|
1854
|
+
sdkHttpResponse?: HttpResponse;
|
|
1847
1855
|
/** The embeddings for each request, in the same order as provided in
|
|
1848
1856
|
the batch request.
|
|
1849
1857
|
*/
|
|
@@ -2779,6 +2787,8 @@ export declare interface GenerateImagesParameters {
|
|
|
2779
2787
|
|
|
2780
2788
|
/** The output images response. */
|
|
2781
2789
|
export declare class GenerateImagesResponse {
|
|
2790
|
+
/** Used to retain the full HTTP response. */
|
|
2791
|
+
sdkHttpResponse?: HttpResponse;
|
|
2782
2792
|
/** List of generated images.
|
|
2783
2793
|
*/
|
|
2784
2794
|
generatedImages?: GeneratedImage[];
|
|
@@ -2841,6 +2851,8 @@ export declare class GenerateVideosOperation implements Operation<GenerateVideos
|
|
|
2841
2851
|
error?: Record<string, unknown>;
|
|
2842
2852
|
/** The response if the operation is successful. */
|
|
2843
2853
|
response?: GenerateVideosResponse;
|
|
2854
|
+
/** The full HTTP response. */
|
|
2855
|
+
sdkHttpResponse?: HttpResponse;
|
|
2844
2856
|
/**
|
|
2845
2857
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2846
2858
|
* @internal
|
|
@@ -6418,6 +6430,8 @@ export declare interface TuningExample {
|
|
|
6418
6430
|
|
|
6419
6431
|
/** A tuning job. */
|
|
6420
6432
|
export declare interface TuningJob {
|
|
6433
|
+
/** Used to retain the full HTTP response. */
|
|
6434
|
+
sdkHttpResponse?: HttpResponse;
|
|
6421
6435
|
/** Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` */
|
|
6422
6436
|
name?: string;
|
|
6423
6437
|
/** Output only. The detailed state of the job. */
|
|
@@ -6466,6 +6480,8 @@ export declare interface TuningJob {
|
|
|
6466
6480
|
|
|
6467
6481
|
/** A long-running operation. */
|
|
6468
6482
|
export declare interface TuningOperation {
|
|
6483
|
+
/** Used to retain the full HTTP response. */
|
|
6484
|
+
sdkHttpResponse?: HttpResponse;
|
|
6469
6485
|
/** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
6470
6486
|
name?: string;
|
|
6471
6487
|
/** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
|
|
@@ -7075,6 +7091,8 @@ export declare interface UpscaleImageParameters {
|
|
|
7075
7091
|
}
|
|
7076
7092
|
|
|
7077
7093
|
export declare class UpscaleImageResponse {
|
|
7094
|
+
/** Used to retain the full HTTP response. */
|
|
7095
|
+
sdkHttpResponse?: HttpResponse;
|
|
7078
7096
|
/** Generated images. */
|
|
7079
7097
|
generatedImages?: GeneratedImage[];
|
|
7080
7098
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google/genai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.mjs",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"build-prod": "rollup -c && api-extractor run --verbose && api-extractor run -c api-extractor.node.json --verbose && api-extractor run -c api-extractor.web.json --verbose && node scripts/ignore_missing_mcp_dep.js",
|
|
43
43
|
"unit-test": "tsc && jasmine dist/test/unit/**/*_test.js dist/test/unit/*_test.js",
|
|
44
44
|
"system-test": "tsc && jasmine dist/test/system/**/*_test.js",
|
|
45
|
-
"test-server-tests": "tsc && GOOGLE_CLOUD_PROJECT=googcloudproj GOOGLE_CLOUD_LOCATION=googcloudloc jasmine dist/test/system/node/*_test.js
|
|
46
|
-
"test-server-tests:record": "tsc && jasmine --fail-fast dist/test/system/node/*_test.js
|
|
45
|
+
"test-server-tests": "tsc && GOOGLE_CLOUD_PROJECT=googcloudproj GOOGLE_CLOUD_LOCATION=googcloudloc jasmine dist/test/system/node/*_test.js -- --test-server",
|
|
46
|
+
"test-server-tests:record": "tsc && jasmine --fail-fast dist/test/system/node/*_test.js -- --test-server --record",
|
|
47
47
|
"docs": "typedoc && node --loader ts-node/esm scripts/add_docsite_license_headers.ts",
|
|
48
48
|
"pages-main": "node --loader ts-node/esm scripts/generate_pages.ts main",
|
|
49
49
|
"pages-release": "node --loader ts-node/esm scripts/generate_pages.ts release",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"prettier": "3.3.3",
|
|
86
86
|
"prettier-plugin-organize-imports": "^4.1.0",
|
|
87
87
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
88
|
-
"test-server-sdk": "^0.2.
|
|
88
|
+
"test-server-sdk": "^0.2.6",
|
|
89
89
|
"ts-node": "^10.9.2",
|
|
90
90
|
"tslib": "^2.8.1",
|
|
91
91
|
"tsx": "^4.19.4",
|