@@ -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
@@ -281,7 +277,7 @@ export interface FunctionCallPart {
281277export interface FunctionDeclaration {
282278 description: string ;
283279 name: string ;
284- parameters? : ObjectSchemaInterface ;
280+ parameters? : ObjectSchema | ObjectSchemaRequest ;
285281}
286282
287283// @public
@@ -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,6 +480,15 @@ 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+
489492// @public @deprecated (undocumented)
490493export interface GroundingAttribution {
491494 // (undocumented)
@@ -498,16 +501,29 @@ export interface GroundingAttribution {
498501 web? : WebAttribution ;
499502}
500503
504+ // @public
505+ export interface GroundingChunk {
506+ web? : WebGroundingChunk ;
507+ }
508+
501509// @public
502510export interface GroundingMetadata {
503511 // @deprecated (undocumented)
504512 groundingAttributions: GroundingAttribution [];
505- // (undocumented)
513+ groundingChunks? : GroundingChunk [];
514+ groundingSupports? : GroundingSupport [];
515+ // @deprecated (undocumented)
506516 retrievalQueries? : string [];
507- // (undocumented)
517+ searchEntryPoint ? : SearchEntrypoint ;
508518 webSearchQueries? : string [];
509519}
510520
521+ // @public
522+ export interface GroundingSupport {
523+ groundingChunkIndices? : number [];
524+ segment? : Segment ;
525+ }
526+
511527// @public
512528export enum HarmBlockMethod {
513529 PROBABILITY = " PROBABILITY" ,
@@ -703,9 +719,8 @@ export class ObjectSchema extends Schema {
703719}
704720
705721// @public
706- export interface ObjectSchemaInterface extends SchemaInterface {
707- // (undocumented)
708- optionalProperties? : string [];
722+ export interface ObjectSchemaRequest extends SchemaRequest {
723+ optionalProperties? : never ;
709724 // (undocumented)
710725 type: SchemaType .OBJECT ;
711726}
@@ -858,14 +873,17 @@ export enum SchemaType {
858873 STRING = " string"
859874}
860875
861- // @public (undocumented)
876+ // @public
877+ export interface SearchEntrypoint {
878+ renderedContent? : string ;
879+ }
880+
881+ // @public
862882export interface Segment {
863- // (undocumented)
864883 endIndex: number ;
865- // (undocumented)
866884 partIndex: number ;
867- // (undocumented)
868885 startIndex: number ;
886+ text: string ;
869887}
870888
871889// @public
@@ -902,7 +920,12 @@ export interface TextPart {
902920}
903921
904922// @public
905- export type Tool = FunctionDeclarationsTool ;
923+ export interface ThinkingConfig {
924+ thinkingBudget? : number ;
925+ }
926+
927+ // @public
928+ export type Tool = FunctionDeclarationsTool | GoogleSearchTool ;
906929
907930// @public
908931export interface ToolConfig {
@@ -923,31 +946,17 @@ export interface UsageMetadata {
923946 promptTokenCount: number ;
924947 // (undocumented)
925948 promptTokensDetails? : ModalityTokenCount [];
949+ thoughtsTokenCount? : number ;
926950 // (undocumented)
927951 totalTokenCount: number ;
928952}
929953
930- // @public @deprecated (undocumented)
931- export type VertexAI = AI ;
932-
933954// @public
934955export class VertexAIBackend extends Backend {
935956 constructor (location ? : string );
936957 readonly location: string ;
937958}
938959
939- // @public @deprecated (undocumented)
940- export const VertexAIError: typeof AIError ;
941-
942- // @public @deprecated (undocumented)
943- export const VertexAIModel: typeof AIModel ;
944-
945- // @public
946- export interface VertexAIOptions {
947- // (undocumented)
948- location? : string ;
949- }
950-
951960// @public
952961export interface VideoMetadata {
953962 endOffset: string ;
@@ -962,5 +971,12 @@ export interface WebAttribution {
962971 uri: string ;
963972}
964973
974+ // @public
975+ export interface WebGroundingChunk {
976+ domain? : string ;
977+ title? : string ;
978+ uri? : string ;
979+ }
980+
965981
966982```
0 commit comments