Skip to content

Commit 4945e6a

Browse files
committed
Merge branch 'main' into dl/thinking-budget
2 parents 181256f + 47b154c commit 4945e6a

31 files changed

+755
-1082
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/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/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`.

common/api-review/ai.api.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export interface FunctionCallPart {
281281
export interface FunctionDeclaration {
282282
description: string;
283283
name: string;
284-
parameters?: ObjectSchemaInterface;
284+
parameters?: ObjectSchema | ObjectSchemaRequest;
285285
}
286286

287287
// @public
@@ -487,6 +487,15 @@ export interface GoogleAIGenerateContentResponse {
487487
usageMetadata?: UsageMetadata;
488488
}
489489

490+
// @public
491+
export interface GoogleSearch {
492+
}
493+
494+
// @public
495+
export interface GoogleSearchTool {
496+
googleSearch: GoogleSearch;
497+
}
498+
490499
// @public @deprecated (undocumented)
491500
export interface GroundingAttribution {
492501
// (undocumented)
@@ -499,16 +508,29 @@ export interface GroundingAttribution {
499508
web?: WebAttribution;
500509
}
501510

511+
// @public
512+
export interface GroundingChunk {
513+
web?: WebGroundingChunk;
514+
}
515+
502516
// @public
503517
export interface GroundingMetadata {
504518
// @deprecated (undocumented)
505519
groundingAttributions: GroundingAttribution[];
506-
// (undocumented)
520+
groundingChunks?: GroundingChunk[];
521+
groundingSupports?: GroundingSupport[];
522+
// @deprecated (undocumented)
507523
retrievalQueries?: string[];
508-
// (undocumented)
524+
searchEntryPoint?: SearchEntrypoint;
509525
webSearchQueries?: string[];
510526
}
511527

528+
// @public
529+
export interface GroundingSupport {
530+
groundingChunkIndices?: number[];
531+
segment?: Segment;
532+
}
533+
512534
// @public
513535
export enum HarmBlockMethod {
514536
PROBABILITY = "PROBABILITY",
@@ -704,9 +726,8 @@ export class ObjectSchema extends Schema {
704726
}
705727

706728
// @public
707-
export interface ObjectSchemaInterface extends SchemaInterface {
708-
// (undocumented)
709-
optionalProperties?: string[];
729+
export interface ObjectSchemaRequest extends SchemaRequest {
730+
optionalProperties?: never;
710731
// (undocumented)
711732
type: SchemaType.OBJECT;
712733
}
@@ -859,14 +880,17 @@ export enum SchemaType {
859880
STRING = "string"
860881
}
861882

862-
// @public (undocumented)
883+
// @public
884+
export interface SearchEntrypoint {
885+
renderedContent?: string;
886+
}
887+
888+
// @public
863889
export interface Segment {
864-
// (undocumented)
865890
endIndex: number;
866-
// (undocumented)
867891
partIndex: number;
868-
// (undocumented)
869892
startIndex: number;
893+
text: string;
870894
}
871895

872896
// @public
@@ -908,7 +932,7 @@ export interface ThinkingConfig {
908932
}
909933

910934
// @public
911-
export type Tool = FunctionDeclarationsTool;
935+
export type Tool = FunctionDeclarationsTool | GoogleSearchTool;
912936

913937
// @public
914938
export interface ToolConfig {
@@ -969,5 +993,12 @@ export interface WebAttribution {
969993
uri: string;
970994
}
971995

996+
// @public
997+
export interface WebGroundingChunk {
998+
domain?: string;
999+
title?: string;
1000+
uri?: string;
1001+
}
1002+
9721003

9731004
```

0 commit comments

Comments
 (0)