@@ -27,7 +27,7 @@ export class AIError extends FirebaseError {
2727}
2828
2929// @public
30- const enum AIErrorCode {
30+ export const enum AIErrorCode {
3131 API_NOT_ENABLED = " api-not-enabled" ,
3232 ERROR = " error" ,
3333 FETCH_ERROR = " fetch-error" ,
@@ -43,10 +43,6 @@ const enum AIErrorCode {
4343 UNSUPPORTED = " unsupported"
4444}
4545
46- export { AIErrorCode }
47-
48- export { AIErrorCode as VertexAIErrorCode }
49-
5046// @public
5147export abstract class AIModel {
5248 // @internal
@@ -381,6 +377,7 @@ export interface GenerationConfig {
381377 stopSequences? : string [];
382378 // (undocumented)
383379 temperature? : number ;
380+ thinkingConfig? : ThinkingConfig ;
384381 // (undocumented)
385382 topK? : number ;
386383 // (undocumented)
@@ -424,9 +421,6 @@ export function getGenerativeModel(ai: AI, modelParams: ModelParams, requestOpti
424421// @beta
425422export function getImagenModel(ai : AI , modelParams : ImagenModelParams , requestOptions ? : RequestOptions ): ImagenModel ;
426423
427- // @public @deprecated (undocumented)
428- export function getVertexAI(app ? : FirebaseApp , options ? : VertexAIOptions ): VertexAI ;
429-
430424// @public
431425export class GoogleAIBackend extends Backend {
432426 constructor ();
@@ -486,14 +480,36 @@ export interface GoogleAIGenerateContentResponse {
486480 usageMetadata? : UsageMetadata ;
487481}
488482
483+ // @public
484+ export interface GoogleSearch {
485+ }
486+
487+ // @public
488+ export interface GoogleSearchTool {
489+ googleSearch: GoogleSearch ;
490+ }
491+
492+ // @public
493+ export interface GroundingChunk {
494+ web? : WebGroundingChunk ;
495+ }
496+
489497// @public
490498export interface GroundingMetadata {
491- // (undocumented)
499+ groundingChunks? : GroundingChunk [];
500+ groundingSupports? : GroundingSupport [];
501+ // @deprecated (undocumented)
492502 retrievalQueries? : string [];
493- // (undocumented)
503+ searchEntryPoint ? : SearchEntrypoint ;
494504 webSearchQueries? : string [];
495505}
496506
507+ // @public
508+ export interface GroundingSupport {
509+ groundingChunkIndices? : number [];
510+ segment? : Segment ;
511+ }
512+
497513// @public
498514export enum HarmBlockMethod {
499515 PROBABILITY = " PROBABILITY" ,
@@ -843,14 +859,17 @@ export enum SchemaType {
843859 STRING = " string"
844860}
845861
846- // @public (undocumented)
862+ // @public
863+ export interface SearchEntrypoint {
864+ renderedContent? : string ;
865+ }
866+
867+ // @public
847868export interface Segment {
848- // (undocumented)
849869 endIndex: number ;
850- // (undocumented)
851870 partIndex: number ;
852- // (undocumented)
853871 startIndex: number ;
872+ text: string ;
854873}
855874
856875// @public
@@ -887,7 +906,12 @@ export interface TextPart {
887906}
888907
889908// @public
890- export type Tool = FunctionDeclarationsTool ;
909+ export interface ThinkingConfig {
910+ thinkingBudget? : number ;
911+ }
912+
913+ // @public
914+ export type Tool = FunctionDeclarationsTool | GoogleSearchTool ;
891915
892916// @public
893917export interface ToolConfig {
@@ -908,31 +932,17 @@ export interface UsageMetadata {
908932 promptTokenCount: number ;
909933 // (undocumented)
910934 promptTokensDetails? : ModalityTokenCount [];
935+ thoughtsTokenCount? : number ;
911936 // (undocumented)
912937 totalTokenCount: number ;
913938}
914939
915- // @public @deprecated (undocumented)
916- export type VertexAI = AI ;
917-
918940// @public
919941export class VertexAIBackend extends Backend {
920942 constructor (location ? : string );
921943 readonly location: string ;
922944}
923945
924- // @public @deprecated (undocumented)
925- export const VertexAIError: typeof AIError ;
926-
927- // @public @deprecated (undocumented)
928- export const VertexAIModel: typeof AIModel ;
929-
930- // @public
931- export interface VertexAIOptions {
932- // (undocumented)
933- location? : string ;
934- }
935-
936946// @public
937947export interface VideoMetadata {
938948 endOffset: string ;
@@ -947,5 +957,12 @@ export interface WebAttribution {
947957 uri: string ;
948958}
949959
960+ // @public
961+ export interface WebGroundingChunk {
962+ domain? : string ;
963+ title? : string ;
964+ uri? : string ;
965+ }
966+
950967
951968```
0 commit comments