Skip to content

Commit 2b27201

Browse files
committed
Merge remote-tracking branch 'origin/main' into ClearSiteDataTerminateFirestore
2 parents 51a279d + ec5f374 commit 2b27201

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1369
-1442
lines changed

.changeset/five-kids-grow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': minor
3+
'@firebase/ai': minor
4+
---
5+
6+
Add support for Grounding with Google Search.

.changeset/hip-impalas-divide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': minor
3+
'@firebase/ai': minor
4+
---
5+
6+
Add support for Thinking Budget.

.changeset/late-beers-develop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'firebase': major
3+
---
4+
5+
Remove `vertexai` import path

.changeset/nervous-needles-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/performance': patch
3+
---
4+
5+
Fix bug where events are not sent if they exceed sendBeacon payload limit

.changeset/rotten-taxis-allow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/ai': patch
3+
---
4+
5+
Fix typings for `functionDeclaration.parameters`.

.changeset/thirty-eggs-laugh.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/ai': major
3+
'firebase': major
4+
---
5+
6+
Remove `VertexAI` APIs.

.changeset/twelve-walls-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/firestore': patch
3+
---
4+
5+
Further improved performance of UTF-8 string ordering logic, which had degraded in v11.3.0, was reverted in v11.3.1, and was re-introduced with some improvements in v11.5.0.

common/api-review/ai.api.md

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5147
export abstract class AIModel {
5248
// @internal
@@ -281,7 +277,7 @@ export interface FunctionCallPart {
281277
export 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
425422
export 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
431425
export 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)
490493
export 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
502510
export 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
512528
export 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
862882
export 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
908931
export 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
934955
export 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
952961
export 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

Comments
 (0)