Skip to content

Commit 988ff56

Browse files
Merge main into release
2 parents 817151e + f9254b6 commit 988ff56

45 files changed

Lines changed: 1818 additions & 207 deletions

Some content is hidden

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

.changeset/long-monkeys-prove.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@firebase/ai': minor
3+
'firebase': minor
4+
---
5+
6+
AI Logic: Extend the `LiveSession.receive()` return types to include a `LiveServiceGoingAwayNotice`
7+
which signifies that the service will soon close the session.

.changeset/nasty-squids-push.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+
Internal: Add tag to log requests made to cloud while in hybrid mode.

.changeset/pink-brooms-compare.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/ai': minor
3+
'firebase': minor
4+
---
5+
6+
Remove "preview" tags from code execution and URL context documentation.

.changeset/serious-files-argue.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+
Log a warning when `databaseId` is not found.

.changeset/tender-items-pretend.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/ai': minor
3+
'firebase': minor
4+
---
5+
6+
Add params on `UsageMetadata` that provide cache-related usage data when the implicit caching feature is used.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': minor
3+
'@firebase/firestore': minor
4+
---
5+
6+
Add support for `regexFind` and `regexFindAll` Pipeline expressions.

.github/workflows/check-vertexai-responses.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515
name: Check Vertex AI Responses
1616

17-
on: pull_request
17+
on:
18+
pull_request:
19+
paths:
20+
- 'packages/ai/**'
1821

1922
jobs:
2023
check-version:

common/api-review/ai.api.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ export interface CitationMetadata {
185185
citations: Citation[];
186186
}
187187

188-
// @beta
188+
// @public
189189
export interface CodeExecutionResult {
190190
outcome?: Outcome;
191191
output?: string;
192192
}
193193

194-
// @beta
194+
// @public
195195
export interface CodeExecutionResultPart {
196196
// (undocumented)
197197
codeExecutionResult?: CodeExecutionResult;
@@ -283,13 +283,13 @@ export interface ErrorDetails {
283283
reason?: string;
284284
}
285285

286-
// @beta
286+
// @public
287287
export interface ExecutableCode {
288288
code?: string;
289289
language?: Language;
290290
}
291291

292-
// @beta
292+
// @public
293293
export interface ExecutableCodePart {
294294
// (undocumented)
295295
codeExecutionResult?: never;
@@ -461,8 +461,6 @@ export interface GenerateContentCandidate {
461461
index: number;
462462
// (undocumented)
463463
safetyRatings?: SafetyRating[];
464-
// Warning: (ae-incompatible-release-tags) The symbol "urlContextMetadata" is marked as @public, but its signature references "URLContextMetadata" which is marked as @beta
465-
//
466464
// (undocumented)
467465
urlContextMetadata?: URLContextMetadata;
468466
}
@@ -873,13 +871,13 @@ export class IntegerSchema extends Schema {
873871
constructor(schemaParams?: SchemaParams);
874872
}
875873

876-
// @beta
874+
// @public
877875
export const Language: {
878876
UNSPECIFIED: string;
879877
PYTHON: string;
880878
};
881879

882-
// @beta
880+
// @public
883881
export type Language = (typeof Language)[keyof typeof Language];
884882

885883
// @beta
@@ -990,6 +988,7 @@ export const LiveResponseType: {
990988
SERVER_CONTENT: string;
991989
TOOL_CALL: string;
992990
TOOL_CALL_CANCELLATION: string;
991+
GOING_AWAY_NOTICE: string;
993992
};
994993

995994
// @beta
@@ -1006,6 +1005,13 @@ export interface LiveServerContent {
10061005
type: 'serverContent';
10071006
}
10081007

1008+
// @beta
1009+
export interface LiveServerGoingAwayNotice {
1010+
timeLeft: number;
1011+
// (undocumented)
1012+
type: 'goingAwayNotice';
1013+
}
1014+
10091015
// @beta
10101016
export interface LiveServerToolCall {
10111017
functionCalls: FunctionCall[];
@@ -1027,7 +1033,7 @@ export class LiveSession {
10271033
close(): Promise<void>;
10281034
inConversation: boolean;
10291035
isClosed: boolean;
1030-
receive(): AsyncGenerator<LiveServerContent | LiveServerToolCall | LiveServerToolCallCancellation>;
1036+
receive(): AsyncGenerator<LiveServerContent | LiveServerToolCall | LiveServerToolCallCancellation | LiveServerGoingAwayNotice>;
10311037
send(request: string | Array<string | Part>, turnComplete?: boolean): Promise<void>;
10321038
sendAudioRealtime(blob: GenerativeContentBlob): Promise<void>;
10331039
sendFunctionResponses(functionResponses: FunctionResponse[]): Promise<void>;
@@ -1105,20 +1111,17 @@ export interface OnDeviceParams {
11051111
promptOptions?: LanguageModelPromptOptions;
11061112
}
11071113

1108-
// @beta
1114+
// @public
11091115
export const Outcome: {
11101116
UNSPECIFIED: string;
11111117
OK: string;
11121118
FAILED: string;
11131119
DEADLINE_EXCEEDED: string;
11141120
};
11151121

1116-
// @beta
1122+
// @public
11171123
export type Outcome = (typeof Outcome)[keyof typeof Outcome];
11181124

1119-
// Warning: (ae-incompatible-release-tags) The symbol "Part" is marked as @public, but its signature references "ExecutableCodePart" which is marked as @beta
1120-
// Warning: (ae-incompatible-release-tags) The symbol "Part" is marked as @public, but its signature references "CodeExecutionResultPart" which is marked as @beta
1121-
//
11221125
// @public
11231126
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart | ExecutableCodePart | CodeExecutionResultPart;
11241127

@@ -1414,7 +1417,7 @@ export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanS
14141417
export interface URLContext {
14151418
}
14161419

1417-
// @beta
1420+
// @public
14181421
export interface URLContextMetadata {
14191422
urlMetadata: URLMetadata[];
14201423
}
@@ -1424,13 +1427,13 @@ export interface URLContextTool {
14241427
urlContext: URLContext;
14251428
}
14261429

1427-
// @beta
1430+
// @public
14281431
export interface URLMetadata {
14291432
retrievedUrl?: string;
14301433
urlRetrievalStatus?: URLRetrievalStatus;
14311434
}
14321435

1433-
// @beta
1436+
// @public
14341437
export const URLRetrievalStatus: {
14351438
URL_RETRIEVAL_STATUS_UNSPECIFIED: string;
14361439
URL_RETRIEVAL_STATUS_SUCCESS: string;
@@ -1439,11 +1442,13 @@ export const URLRetrievalStatus: {
14391442
URL_RETRIEVAL_STATUS_UNSAFE: string;
14401443
};
14411444

1442-
// @beta
1445+
// @public
14431446
export type URLRetrievalStatus = (typeof URLRetrievalStatus)[keyof typeof URLRetrievalStatus];
14441447

14451448
// @public
14461449
export interface UsageMetadata {
1450+
cachedContentTokenCount?: number;
1451+
cacheTokensDetails?: ModalityTokenCount[];
14471452
// (undocumented)
14481453
candidatesTokenCount: number;
14491454
// (undocumented)

common/api-review/firestore-lite-pipelines.api.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,14 @@ export abstract class Expression {
544544
/* Excluded from this release type: _readUserData */
545545
regexContains(pattern: Expression): BooleanExpression;
546546
/* Excluded from this release type: _readUserData */
547+
regexFind(pattern: string): FunctionExpression;
548+
/* Excluded from this release type: _readUserData */
549+
regexFind(pattern: Expression): FunctionExpression;
550+
/* Excluded from this release type: _readUserData */
551+
regexFindAll(pattern: string): FunctionExpression;
552+
/* Excluded from this release type: _readUserData */
553+
regexFindAll(pattern: Expression): FunctionExpression;
554+
/* Excluded from this release type: _readUserData */
547555
regexMatch(pattern: string): BooleanExpression;
548556
/* Excluded from this release type: _readUserData */
549557
regexMatch(pattern: Expression): BooleanExpression;
@@ -1021,6 +1029,30 @@ export function regexContains(stringExpression: Expression, pattern: string): Bo
10211029
// @beta
10221030
export function regexContains(stringExpression: Expression, pattern: Expression): BooleanExpression;
10231031

1032+
// @beta
1033+
export function regexFind(fieldName: string, pattern: string): FunctionExpression;
1034+
1035+
// @beta
1036+
export function regexFind(fieldName: string, pattern: Expression): FunctionExpression;
1037+
1038+
// @beta
1039+
export function regexFind(stringExpression: Expression, pattern: string): FunctionExpression;
1040+
1041+
// @beta
1042+
export function regexFind(stringExpression: Expression, pattern: Expression): FunctionExpression;
1043+
1044+
// @beta
1045+
export function regexFindAll(fieldName: string, pattern: string): FunctionExpression;
1046+
1047+
// @beta
1048+
export function regexFindAll(fieldName: string, pattern: Expression): FunctionExpression;
1049+
1050+
// @beta
1051+
export function regexFindAll(stringExpression: Expression, pattern: string): FunctionExpression;
1052+
1053+
// @beta
1054+
export function regexFindAll(stringExpression: Expression, pattern: Expression): FunctionExpression;
1055+
10241056
// @beta
10251057
export function regexMatch(fieldName: string, pattern: string): BooleanExpression;
10261058

common/api-review/firestore-pipelines.api.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,14 @@ export abstract class Expression {
547547
/* Excluded from this release type: _readUserData */
548548
regexContains(pattern: Expression): BooleanExpression;
549549
/* Excluded from this release type: _readUserData */
550+
regexFind(pattern: string): FunctionExpression;
551+
/* Excluded from this release type: _readUserData */
552+
regexFind(pattern: Expression): FunctionExpression;
553+
/* Excluded from this release type: _readUserData */
554+
regexFindAll(pattern: string): FunctionExpression;
555+
/* Excluded from this release type: _readUserData */
556+
regexFindAll(pattern: Expression): FunctionExpression;
557+
/* Excluded from this release type: _readUserData */
550558
regexMatch(pattern: string): BooleanExpression;
551559
/* Excluded from this release type: _readUserData */
552560
regexMatch(pattern: Expression): BooleanExpression;
@@ -1058,6 +1066,30 @@ export function regexContains(stringExpression: Expression, pattern: string): Bo
10581066
// @beta
10591067
export function regexContains(stringExpression: Expression, pattern: Expression): BooleanExpression;
10601068

1069+
// @beta
1070+
export function regexFind(fieldName: string, pattern: string): FunctionExpression;
1071+
1072+
// @beta
1073+
export function regexFind(fieldName: string, pattern: Expression): FunctionExpression;
1074+
1075+
// @beta
1076+
export function regexFind(stringExpression: Expression, pattern: string): FunctionExpression;
1077+
1078+
// @beta
1079+
export function regexFind(stringExpression: Expression, pattern: Expression): FunctionExpression;
1080+
1081+
// @beta
1082+
export function regexFindAll(fieldName: string, pattern: string): FunctionExpression;
1083+
1084+
// @beta
1085+
export function regexFindAll(fieldName: string, pattern: Expression): FunctionExpression;
1086+
1087+
// @beta
1088+
export function regexFindAll(stringExpression: Expression, pattern: string): FunctionExpression;
1089+
1090+
// @beta
1091+
export function regexFindAll(stringExpression: Expression, pattern: Expression): FunctionExpression;
1092+
10611093
// @beta
10621094
export function regexMatch(fieldName: string, pattern: string): BooleanExpression;
10631095

0 commit comments

Comments
 (0)