@google/genai 1.20.0 → 1.21.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 +69 -1
- package/dist/index.cjs +7090 -7144
- package/dist/index.mjs +7087 -7145
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +7090 -7144
- package/dist/node/index.mjs +7087 -7145
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +69 -1
- package/dist/web/index.mjs +7087 -7145
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +69 -1
- package/package.json +1 -1
package/dist/genai.d.ts
CHANGED
|
@@ -1137,6 +1137,23 @@ export declare interface ContentEmbeddingStatistics {
|
|
|
1137
1137
|
|
|
1138
1138
|
export declare type ContentListUnion = Content | Content[] | PartUnion | PartUnion[];
|
|
1139
1139
|
|
|
1140
|
+
/** A content reference image.
|
|
1141
|
+
|
|
1142
|
+
A content reference image represents a subject to reference (ex. person,
|
|
1143
|
+
product, animal) provided by the user. It can optionally be provided in
|
|
1144
|
+
addition to a style reference image (ex. background, style reference).
|
|
1145
|
+
*/
|
|
1146
|
+
export declare class ContentReferenceImage {
|
|
1147
|
+
/** The reference image for the editing operation. */
|
|
1148
|
+
referenceImage?: Image_2;
|
|
1149
|
+
/** The id of the reference image. */
|
|
1150
|
+
referenceId?: number;
|
|
1151
|
+
/** The type of the reference image. Only set by the SDK. */
|
|
1152
|
+
referenceType?: string;
|
|
1153
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1154
|
+
toReferenceImageAPI(): ReferenceImageAPIInternal;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1140
1157
|
export declare type ContentUnion = Content | PartUnion[] | PartUnion;
|
|
1141
1158
|
|
|
1142
1159
|
/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */
|
|
@@ -2401,6 +2418,9 @@ export declare class FunctionResponse {
|
|
|
2401
2418
|
willContinue?: boolean;
|
|
2402
2419
|
/** Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. */
|
|
2403
2420
|
scheduling?: FunctionResponseScheduling;
|
|
2421
|
+
/** List of parts that constitute a function response. Each part may
|
|
2422
|
+
have a different IANA MIME type. */
|
|
2423
|
+
parts?: FunctionResponsePart[];
|
|
2404
2424
|
/** Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. */
|
|
2405
2425
|
id?: string;
|
|
2406
2426
|
/** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */
|
|
@@ -2409,6 +2429,44 @@ export declare class FunctionResponse {
|
|
|
2409
2429
|
response?: Record<string, unknown>;
|
|
2410
2430
|
}
|
|
2411
2431
|
|
|
2432
|
+
/** Raw media bytes for function response.
|
|
2433
|
+
|
|
2434
|
+
Text should not be sent as raw bytes, use the FunctionResponse.response
|
|
2435
|
+
field.
|
|
2436
|
+
*/
|
|
2437
|
+
export declare class FunctionResponseBlob {
|
|
2438
|
+
/** Required. The IANA standard MIME type of the source data. */
|
|
2439
|
+
mimeType?: string;
|
|
2440
|
+
/** Required. Inline media bytes.
|
|
2441
|
+
* @remarks Encoded as base64 string. */
|
|
2442
|
+
data?: string;
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
/** URI based data for function response. */
|
|
2446
|
+
export declare class FunctionResponseFileData {
|
|
2447
|
+
/** Required. URI. */
|
|
2448
|
+
fileUri?: string;
|
|
2449
|
+
/** Required. The IANA standard MIME type of the source data. */
|
|
2450
|
+
mimeType?: string;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
/** A datatype containing media that is part of a `FunctionResponse` message.
|
|
2454
|
+
|
|
2455
|
+
A `FunctionResponsePart` consists of data which has an associated datatype. A
|
|
2456
|
+
`FunctionResponsePart` can only contain one of the accepted types in
|
|
2457
|
+
`FunctionResponsePart.data`.
|
|
2458
|
+
|
|
2459
|
+
A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
|
|
2460
|
+
type and subtype of the media if the `inline_data` field is filled with raw
|
|
2461
|
+
bytes.
|
|
2462
|
+
*/
|
|
2463
|
+
export declare class FunctionResponsePart {
|
|
2464
|
+
/** Optional. Inline media bytes. */
|
|
2465
|
+
inlineData?: FunctionResponseBlob;
|
|
2466
|
+
/** Optional. URI based data. */
|
|
2467
|
+
fileData?: FunctionResponseFileData;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2412
2470
|
/** Specifies how the response should be scheduled in the conversation. */
|
|
2413
2471
|
export declare enum FunctionResponseScheduling {
|
|
2414
2472
|
/**
|
|
@@ -5873,7 +5931,7 @@ export declare interface RecontextImageSource {
|
|
|
5873
5931
|
productImages?: ProductImage[];
|
|
5874
5932
|
}
|
|
5875
5933
|
|
|
5876
|
-
export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage;
|
|
5934
|
+
export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage | ContentReferenceImage;
|
|
5877
5935
|
|
|
5878
5936
|
/** Private class that represents a Reference image that is sent to API. */
|
|
5879
5937
|
declare interface ReferenceImageAPIInternal {
|
|
@@ -6770,6 +6828,12 @@ export declare interface ToolCodeExecution {
|
|
|
6770
6828
|
export declare interface ToolComputerUse {
|
|
6771
6829
|
/** Required. The environment being operated. */
|
|
6772
6830
|
environment?: Environment;
|
|
6831
|
+
/** By default, predefined functions are included in the final model call.
|
|
6832
|
+
Some of them can be explicitly excluded from being automatically included.
|
|
6833
|
+
This can serve two purposes:
|
|
6834
|
+
1. Using a more restricted / different action space.
|
|
6835
|
+
2. Improving the definitions / instructions of predefined functions. */
|
|
6836
|
+
excludedPredefinedFunctions?: string[];
|
|
6773
6837
|
}
|
|
6774
6838
|
|
|
6775
6839
|
/** Tool config.
|
|
@@ -7153,6 +7217,9 @@ declare namespace types {
|
|
|
7153
7217
|
FunctionCall,
|
|
7154
7218
|
CodeExecutionResult,
|
|
7155
7219
|
ExecutableCode,
|
|
7220
|
+
FunctionResponseBlob,
|
|
7221
|
+
FunctionResponseFileData,
|
|
7222
|
+
FunctionResponsePart,
|
|
7156
7223
|
FunctionResponse,
|
|
7157
7224
|
Part,
|
|
7158
7225
|
Content,
|
|
@@ -7409,6 +7476,7 @@ declare namespace types {
|
|
|
7409
7476
|
ControlReferenceImage,
|
|
7410
7477
|
StyleReferenceImage,
|
|
7411
7478
|
SubjectReferenceImage,
|
|
7479
|
+
ContentReferenceImage,
|
|
7412
7480
|
LiveServerSetupComplete,
|
|
7413
7481
|
Transcription,
|
|
7414
7482
|
LiveServerContent,
|