Skip to content

Commit 868fb02

Browse files
committed
Merge branch 'main' into dl/abort-signal
2 parents 12f4dea + 8a03143 commit 868fb02

File tree

92 files changed

+1097
-308
lines changed

Some content is hidden

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

92 files changed

+1097
-308
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/firestore": patch
3+
"@firebase/util": minor
4+
---
5+
6+
Fix Safari/WebKit cache issues when client-side indexing is used.

.changeset/fast-mangos-chew.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/vertexai': patch
3+
---
4+
5+
Pass `GenerativeModel`'s `BaseParams` to created chat sessions. This fixes an issue where `GenerationConfig` would not be inherited from `ChatSession`.

.changeset/nice-plants-thank.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.changeset/nine-pugs-crash.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.changeset/perfect-camels-try.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/vertexai': minor
4+
---
5+
6+
Add support for Gemini multimodal output

.vscode/launch.json

Lines changed: 65 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "AI Unit Tests (node)",
9+
"type": "node",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
12+
"cwd": "${workspaceRoot}/packages/vertexai",
13+
"args": [
14+
"--require",
15+
"ts-node/register",
16+
"--require",
17+
"src/index.node.ts",
18+
"--timeout",
19+
"5000",
20+
"src/**/*.test.ts"
21+
],
22+
"env": {
23+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
24+
},
25+
"sourceMaps": true
26+
},
727
{
828
"type": "node",
929
"request": "launch",
@@ -18,9 +38,9 @@
1838
"${workspaceFolder}/repo-scripts/prune-dts/*.test.ts"
1939
],
2040
"env": {
21-
"TS_NODE_COMPILER_OPTIONS" : "{\"module\":\"commonjs\"}"
41+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
2242
},
23-
"sourceMaps": true,
43+
"sourceMaps": true
2444
},
2545
{
2646
"type": "node",
@@ -30,16 +50,17 @@
3050
"cwd": "${workspaceRoot}/packages/database",
3151
"args": [
3252
"test/{,!(browser)/**/}*.test.ts",
33-
"--file", "src/index.node.ts",
34-
"--config", "../../config/mocharc.node.js",
53+
"--file",
54+
"src/index.node.ts",
55+
"--config",
56+
"../../config/mocharc.node.js"
3557
],
3658
"env": {
37-
"TS_NODE_FILES":true,
59+
"TS_NODE_FILES": true,
3860
"TS_NODE_CACHE": "NO",
39-
"TS_NODE_COMPILER_OPTIONS" : "{\"module\":\"commonjs\"}"
61+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
4062
},
41-
"sourceMaps": true,
42-
"protocol": "inspector"
63+
"sourceMaps": true
4364
},
4465
{
4566
"type": "node",
@@ -48,14 +69,16 @@
4869
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
4970
"cwd": "${workspaceRoot}/packages/firestore",
5071
"args": [
51-
"--require", "babel-register.js",
52-
"--require", "src/index.node.ts",
53-
"--timeout", "5000",
72+
"--require",
73+
"babel-register.js",
74+
"--require",
75+
"src/index.node.ts",
76+
"--timeout",
77+
"5000",
5478
"test/{,!(browser|integration)/**/}*.test.ts",
5579
"--exit"
5680
],
57-
"sourceMaps": true,
58-
"protocol": "inspector"
81+
"sourceMaps": true
5982
},
6083
{
6184
"type": "node",
@@ -64,18 +87,21 @@
6487
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
6588
"cwd": "${workspaceRoot}/packages/firestore",
6689
"args": [
67-
"--require", "babel-register.js",
68-
"--require", "index.node.ts",
69-
"--require", "test/util/node_persistence.ts",
70-
"--timeout", "5000",
90+
"--require",
91+
"babel-register.js",
92+
"--require",
93+
"index.node.ts",
94+
"--require",
95+
"test/util/node_persistence.ts",
96+
"--timeout",
97+
"5000",
7198
"test/{,!(browser|integration)/**/}*.test.ts",
7299
"--exit"
73100
],
74101
"env": {
75102
"USE_MOCK_PERSISTENCE": "YES"
76103
},
77-
"sourceMaps": true,
78-
"protocol": "inspector"
104+
"sourceMaps": true
79105
},
80106
{
81107
"type": "node",
@@ -84,17 +110,19 @@
84110
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
85111
"cwd": "${workspaceRoot}/packages/firestore",
86112
"args": [
87-
"--require", "babel-register.js",
88-
"--require", "index.node.ts",
89-
"--timeout", "5000",
113+
"--require",
114+
"babel-register.js",
115+
"--require",
116+
"index.node.ts",
117+
"--timeout",
118+
"5000",
90119
"test/{,!(browser|unit)/**/}*.test.ts",
91120
"--exit"
92121
],
93122
"env": {
94-
"FIRESTORE_TARGET_BACKEND" : "emulator",
123+
"FIRESTORE_TARGET_BACKEND": "emulator"
95124
},
96-
"sourceMaps": true,
97-
"protocol": "inspector"
125+
"sourceMaps": true
98126
},
99127
{
100128
"type": "node",
@@ -103,45 +131,38 @@
103131
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
104132
"cwd": "${workspaceRoot}/packages/firestore",
105133
"args": [
106-
"--require", "babel-register.js",
107-
"--require", "index.node.ts",
108-
"--require", "test/util/node_persistence.ts",
109-
"--timeout", "5000",
134+
"--require",
135+
"babel-register.js",
136+
"--require",
137+
"index.node.ts",
138+
"--require",
139+
"test/util/node_persistence.ts",
140+
"--timeout",
141+
"5000",
110142
"test/{,!(browser|unit)/**/}*.test.ts",
111143
"--exit"
112144
],
113145
"env": {
114146
"USE_MOCK_PERSISTENCE": "YES",
115-
"FIRESTORE_TARGET_BACKEND" : "emulator",
147+
"FIRESTORE_TARGET_BACKEND": "emulator"
116148
},
117-
"sourceMaps": true,
118-
"protocol": "inspector"
149+
"sourceMaps": true
119150
},
120151
{
121152
"type": "node",
122153
"request": "launch",
123154
"name": "Firestore Unit Tests (Browser)",
124155
"program": "${workspaceRoot}/node_modules/.bin/karma",
125156
"cwd": "${workspaceRoot}/packages/firestore",
126-
"args": [
127-
"start",
128-
"--auto-watch",
129-
"--unit",
130-
"--browsers", "Chrome"
131-
]
157+
"args": ["start", "--auto-watch", "--unit", "--browsers", "Chrome"]
132158
},
133159
{
134160
"type": "node",
135161
"request": "launch",
136162
"name": "Firestore Integration Tests (Browser)",
137163
"program": "${workspaceRoot}/node_modules/.bin/karma",
138164
"cwd": "${workspaceRoot}/packages/firestore",
139-
"args": [
140-
"start",
141-
"--auto-watch",
142-
"--integration",
143-
"--browsers", "Chrome"
144-
]
165+
"args": ["start", "--auto-watch", "--integration", "--browsers", "Chrome"]
145166
}
146167
]
147168
}

common/api-review/util.api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ export function isReactNative(): boolean;
317317
// @public
318318
export function isSafari(): boolean;
319319

320+
// Warning: (ae-missing-release-tag) "isSafariOrWebkit" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
321+
//
322+
// @public
323+
export function isSafariOrWebkit(): boolean;
324+
320325
// Warning: (ae-missing-release-tag) "issuedAtTime" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
321326
//
322327
// @public

common/api-review/vertexai.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export { Date_2 as Date }
124124
export interface EnhancedGenerateContentResponse extends GenerateContentResponse {
125125
// (undocumented)
126126
functionCalls: () => FunctionCall[] | undefined;
127+
inlineDataParts: () => InlineDataPart[] | undefined;
127128
text: () => string;
128129
}
129130

@@ -304,6 +305,8 @@ export interface GenerationConfig {
304305
// (undocumented)
305306
presencePenalty?: number;
306307
responseMimeType?: string;
308+
// @beta
309+
responseModalities?: ResponseModality[];
307310
responseSchema?: TypedSchema | SchemaRequest;
308311
// (undocumented)
309312
stopSequences?: string[];
@@ -596,6 +599,15 @@ export interface RequestOptions {
596599
timeout?: number;
597600
}
598601

602+
// @beta
603+
export const ResponseModality: {
604+
readonly TEXT: "TEXT";
605+
readonly IMAGE: "IMAGE";
606+
};
607+
608+
// @beta
609+
export type ResponseModality = (typeof ResponseModality)[keyof typeof ResponseModality];
610+
599611
// @public (undocumented)
600612
export interface RetrievedContextAttribution {
601613
// (undocumented)

config/karma.base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const config = {
5353

5454
// Doing 65 seconds to allow for the 20 second firestore tests
5555
browserNoActivityTimeout: 65000,
56+
browserDisconnectTimeout: 65000,
5657

5758
// Preprocess matching files before serving them to the browser.
5859
// Available preprocessors:

docs-devsite/vertexai.enhancedgeneratecontentresponse.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface EnhancedGenerateContentResponse extends GenerateContentResponse
2424
| Property | Type | Description |
2525
| --- | --- | --- |
2626
| [functionCalls](./vertexai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponsefunctioncalls) | () =&gt; [FunctionCall](./vertexai.functioncall.md#functioncall_interface)<!-- -->\[\] \| undefined | |
27+
| [inlineDataParts](./vertexai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponseinlinedataparts) | () =&gt; [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface)<!-- -->\[\] \| undefined | Aggregates and returns all [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface)<!-- -->s from the [GenerateContentResponse](./vertexai.generatecontentresponse.md#generatecontentresponse_interface)<!-- -->'s first candidate. |
2728
| [text](./vertexai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponsetext) | () =&gt; string | Returns the text string from the response, if available. Throws if the prompt or candidate was blocked. |
2829
2930
## EnhancedGenerateContentResponse.functionCalls
@@ -34,6 +35,16 @@ export interface EnhancedGenerateContentResponse extends GenerateContentResponse
3435
functionCalls: () => FunctionCall[] | undefined;
3536
```
3637
38+
## EnhancedGenerateContentResponse.inlineDataParts
39+
40+
Aggregates and returns all [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface)<!-- -->s from the [GenerateContentResponse](./vertexai.generatecontentresponse.md#generatecontentresponse_interface)<!-- -->'s first candidate.
41+
42+
<b>Signature:</b>
43+
44+
```typescript
45+
inlineDataParts: () => InlineDataPart[] | undefined;
46+
```
47+
3748
## EnhancedGenerateContentResponse.text
3849
3950
Returns the text string from the response, if available. Throws if the prompt or candidate was blocked.

0 commit comments

Comments
 (0)