@@ -175,13 +175,13 @@ export interface CitationMetadata {
175
175
citations: Citation [];
176
176
}
177
177
178
- // @public
178
+ // @beta
179
179
export interface CodeExecutionResult {
180
180
outcome? : Outcome ;
181
181
output? : string ;
182
182
}
183
183
184
- // @public
184
+ // @beta
185
185
export interface CodeExecutionResultPart {
186
186
// (undocumented)
187
187
codeExecutionResult? : CodeExecutionResult ;
@@ -203,7 +203,7 @@ export interface CodeExecutionResultPart {
203
203
thoughtSignature? : never ;
204
204
}
205
205
206
- // @public
206
+ // @beta
207
207
export interface CodeExecutionTool {
208
208
codeExecution: {};
209
209
}
@@ -271,13 +271,13 @@ export interface ErrorDetails {
271
271
reason? : string ;
272
272
}
273
273
274
- // @public
274
+ // @beta
275
275
export interface ExecutableCode {
276
276
code? : string ;
277
277
language? : Language ;
278
278
}
279
279
280
- // @public
280
+ // @beta
281
281
export interface ExecutableCodePart {
282
282
// (undocumented)
283
283
codeExecutionResult? : never ;
@@ -449,6 +449,10 @@ export interface GenerateContentCandidate {
449
449
index: number ;
450
450
// (undocumented)
451
451
safetyRatings? : SafetyRating [];
452
+ // Warning: (ae-incompatible-release-tags) The symbol "urlContextMetadata" is marked as @public, but its signature references "URLContextMetadata" which is marked as @beta
453
+ //
454
+ // (undocumented)
455
+ urlContextMetadata? : URLContextMetadata ;
452
456
}
453
457
454
458
// @public
@@ -549,7 +553,7 @@ export function getAI(app?: FirebaseApp, options?: AIOptions): AI;
549
553
// @public
550
554
export function getGenerativeModel(ai : AI , modelParams : ModelParams | HybridParams , requestOptions ? : RequestOptions ): GenerativeModel ;
551
555
552
- // @beta
556
+ // @public
553
557
export function getImagenModel(ai : AI , modelParams : ImagenModelParams , requestOptions ? : RequestOptions ): ImagenModel ;
554
558
555
559
// @beta
@@ -600,6 +604,8 @@ export interface GoogleAIGenerateContentCandidate {
600
604
index: number ;
601
605
// (undocumented)
602
606
safetyRatings? : SafetyRating [];
607
+ // (undocumented)
608
+ urlContextMetadata? : URLContextMetadata ;
603
609
}
604
610
605
611
// Warning: (ae-internal-missing-underscore) The name "GoogleAIGenerateContentResponse" should be prefixed with an underscore because the declaration is marked as @internal
@@ -706,7 +712,7 @@ export interface HybridParams {
706
712
onDeviceParams? : OnDeviceParams ;
707
713
}
708
714
709
- // @beta
715
+ // @public
710
716
export const ImagenAspectRatio: {
711
717
readonly SQUARE: " 1:1" ;
712
718
readonly LANDSCAPE_3x4: " 3:4" ;
@@ -715,16 +721,16 @@ export const ImagenAspectRatio: {
715
721
readonly PORTRAIT_9x16: " 9:16" ;
716
722
};
717
723
718
- // @beta
724
+ // @public
719
725
export type ImagenAspectRatio = (typeof ImagenAspectRatio )[keyof typeof ImagenAspectRatio ];
720
726
721
- // @beta
727
+ // @public
722
728
export interface ImagenGCSImage {
723
729
gcsURI: string ;
724
730
mimeType: string ;
725
731
}
726
732
727
- // @beta
733
+ // @public
728
734
export interface ImagenGenerationConfig {
729
735
addWatermark? : boolean ;
730
736
aspectRatio? : ImagenAspectRatio ;
@@ -733,27 +739,27 @@ export interface ImagenGenerationConfig {
733
739
numberOfImages? : number ;
734
740
}
735
741
736
- // @beta
742
+ // @public
737
743
export interface ImagenGenerationResponse <T extends ImagenInlineImage | ImagenGCSImage > {
738
744
filteredReason? : string ;
739
745
images: T [];
740
746
}
741
747
742
- // @beta
748
+ // @public
743
749
export class ImagenImageFormat {
744
750
compressionQuality? : number ;
745
751
static jpeg(compressionQuality ? : number ): ImagenImageFormat ;
746
752
mimeType: string ;
747
753
static png(): ImagenImageFormat ;
748
754
}
749
755
750
- // @beta
756
+ // @public
751
757
export interface ImagenInlineImage {
752
758
bytesBase64Encoded: string ;
753
759
mimeType: string ;
754
760
}
755
761
756
- // @beta
762
+ // @public
757
763
export class ImagenModel extends AIModel {
758
764
constructor (ai : AI , modelParams : ImagenModelParams , requestOptions ? : RequestOptions | undefined );
759
765
generateImages(prompt : string ): Promise <ImagenGenerationResponse <ImagenInlineImage >>;
@@ -765,35 +771,35 @@ export class ImagenModel extends AIModel {
765
771
safetySettings? : ImagenSafetySettings ;
766
772
}
767
773
768
- // @beta
774
+ // @public
769
775
export interface ImagenModelParams {
770
776
generationConfig? : ImagenGenerationConfig ;
771
777
model: string ;
772
778
safetySettings? : ImagenSafetySettings ;
773
779
}
774
780
775
- // @beta
781
+ // @public
776
782
export const ImagenPersonFilterLevel: {
777
783
readonly BLOCK_ALL: " dont_allow" ;
778
784
readonly ALLOW_ADULT: " allow_adult" ;
779
785
readonly ALLOW_ALL: " allow_all" ;
780
786
};
781
787
782
- // @beta
788
+ // @public
783
789
export type ImagenPersonFilterLevel = (typeof ImagenPersonFilterLevel )[keyof typeof ImagenPersonFilterLevel ];
784
790
785
- // @beta
791
+ // @public
786
792
export const ImagenSafetyFilterLevel: {
787
793
readonly BLOCK_LOW_AND_ABOVE: " block_low_and_above" ;
788
794
readonly BLOCK_MEDIUM_AND_ABOVE: " block_medium_and_above" ;
789
795
readonly BLOCK_ONLY_HIGH: " block_only_high" ;
790
796
readonly BLOCK_NONE: " block_none" ;
791
797
};
792
798
793
- // @beta
799
+ // @public
794
800
export type ImagenSafetyFilterLevel = (typeof ImagenSafetyFilterLevel )[keyof typeof ImagenSafetyFilterLevel ];
795
801
796
- // @beta
802
+ // @public
797
803
export interface ImagenSafetySettings {
798
804
personFilterLevel? : ImagenPersonFilterLevel ;
799
805
safetyFilterLevel? : ImagenSafetyFilterLevel ;
@@ -836,13 +842,13 @@ export class IntegerSchema extends Schema {
836
842
constructor (schemaParams ? : SchemaParams );
837
843
}
838
844
839
- // @public
845
+ // @beta
840
846
export const Language: {
841
847
UNSPECIFIED: string ;
842
848
PYTHON: string ;
843
849
};
844
850
845
- // @public
851
+ // @beta
846
852
export type Language = (typeof Language )[keyof typeof Language ];
847
853
848
854
// @beta
@@ -988,6 +994,7 @@ export class LiveSession {
988
994
isClosed: boolean ;
989
995
receive(): AsyncGenerator <LiveServerContent | LiveServerToolCall | LiveServerToolCallCancellation >;
990
996
send(request : string | Array <string | Part >, turnComplete ? : boolean ): Promise <void >;
997
+ sendFunctionResponses(functionResponses : FunctionResponse []): Promise <void >;
991
998
sendMediaChunks(mediaChunks : GenerativeContentBlob []): Promise <void >;
992
999
sendMediaStream(mediaChunkStream : ReadableStream <GenerativeContentBlob >): Promise <void >;
993
1000
}
@@ -1058,17 +1065,20 @@ export interface OnDeviceParams {
1058
1065
promptOptions? : LanguageModelPromptOptions ;
1059
1066
}
1060
1067
1061
- // @public
1068
+ // @beta
1062
1069
export const Outcome: {
1063
1070
UNSPECIFIED: string ;
1064
1071
OK: string ;
1065
1072
FAILED: string ;
1066
1073
DEADLINE_EXCEEDED: string ;
1067
1074
};
1068
1075
1069
- // @public
1076
+ // @beta
1070
1077
export type Outcome = (typeof Outcome )[keyof typeof Outcome ];
1071
1078
1079
+ // Warning: (ae-incompatible-release-tags) The symbol "Part" is marked as @public, but its signature references "ExecutableCodePart" which is marked as @beta
1080
+ // Warning: (ae-incompatible-release-tags) The symbol "Part" is marked as @public, but its signature references "CodeExecutionResultPart" which is marked as @beta
1081
+ //
1072
1082
// @public
1073
1083
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart | ExecutableCodePart | CodeExecutionResultPart ;
1074
1084
@@ -1254,7 +1264,7 @@ export function startAudioConversation(liveSession: LiveSession, options?: Start
1254
1264
1255
1265
// @beta
1256
1266
export interface StartAudioConversationOptions {
1257
- functionCallingHandler? : (functionCalls : LiveServerToolCall [ ' functionCalls ' ]) => Promise <Part >;
1267
+ functionCallingHandler? : (functionCalls : FunctionCall [ ]) => Promise <FunctionResponse >;
1258
1268
}
1259
1269
1260
1270
// @public
@@ -1304,8 +1314,11 @@ export interface ThinkingConfig {
1304
1314
thinkingBudget? : number ;
1305
1315
}
1306
1316
1317
+ // Warning: (ae-incompatible-release-tags) The symbol "Tool" is marked as @public, but its signature references "CodeExecutionTool" which is marked as @beta
1318
+ // Warning: (ae-incompatible-release-tags) The symbol "Tool" is marked as @public, but its signature references "URLContextTool" which is marked as @beta
1319
+ //
1307
1320
// @public
1308
- export type Tool = FunctionDeclarationsTool | GoogleSearchTool | CodeExecutionTool ;
1321
+ export type Tool = FunctionDeclarationsTool | GoogleSearchTool | CodeExecutionTool | URLContextTool ;
1309
1322
1310
1323
// @public
1311
1324
export interface ToolConfig {
@@ -1316,6 +1329,38 @@ export interface ToolConfig {
1316
1329
// @public
1317
1330
export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanSchema | ObjectSchema | ArraySchema | AnyOfSchema ;
1318
1331
1332
+ // @beta
1333
+ export interface URLContext {
1334
+ }
1335
+
1336
+ // @beta
1337
+ export interface URLContextMetadata {
1338
+ urlMetadata: URLMetadata [];
1339
+ }
1340
+
1341
+ // @beta
1342
+ export interface URLContextTool {
1343
+ urlContext: URLContext ;
1344
+ }
1345
+
1346
+ // @beta
1347
+ export interface URLMetadata {
1348
+ retrievedUrl? : string ;
1349
+ urlRetrievalStatus? : URLRetrievalStatus ;
1350
+ }
1351
+
1352
+ // @beta
1353
+ export const URLRetrievalStatus: {
1354
+ URL_RETRIEVAL_STATUS_UNSPECIFIED: string ;
1355
+ URL_RETRIEVAL_STATUS_SUCCESS: string ;
1356
+ URL_RETRIEVAL_STATUS_ERROR: string ;
1357
+ URL_RETRIEVAL_STATUS_PAYWALL: string ;
1358
+ URL_RETRIEVAL_STATUS_UNSAFE: string ;
1359
+ };
1360
+
1361
+ // @beta
1362
+ export type URLRetrievalStatus = (typeof URLRetrievalStatus )[keyof typeof URLRetrievalStatus ];
1363
+
1319
1364
// @public
1320
1365
export interface UsageMetadata {
1321
1366
// (undocumented)
@@ -1327,6 +1372,8 @@ export interface UsageMetadata {
1327
1372
// (undocumented)
1328
1373
promptTokensDetails? : ModalityTokenCount [];
1329
1374
thoughtsTokenCount? : number ;
1375
+ toolUsePromptTokenCount? : number ;
1376
+ toolUsePromptTokensDetails? : ModalityTokenCount [];
1330
1377
// (undocumented)
1331
1378
totalTokenCount: number ;
1332
1379
}
0 commit comments