Skip to content

Commit 189ca45

Browse files
mansisampatgoogle-oss-botgithub-actions[bot]maneeshtMarkDuckworth
authored
Merge with main (#9099)
* Version Packages (#9016) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Fixed scroll behavior (#8977)" (#9053) * Revert "Fixed scroll behavior (#9043)" This reverts commit 9bcd1ea. * Revert "Add Emulator Overlay (#8977) (#9031)" This reverts commit 8593fa0. * Undid revert of util * Create dirty-crews-cross.md * Removed unnecessary markdown file * Updated to only show banner when calling connect*Emulator (#9055) * Version Packages (#9054) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Close webchannel instances on terminate (#9041) Explicitly close any unclosed WebChannel instances on Firestore#terminate() * Reorder reporters to prevent log message duplication in CI (#9040) * docs(ai): Fix 'occured' typo in error codes (#9021) * feat(ai): Add `HarmBlockThreshold.OFF` (#9050) * feat(ai): Schema `title`, `maximum`, `minimum`, and `propertyOrdering` (#9047) * feat(ai): Add support for `minItems` and `maxItems` to `Schema` (#9026) * Build out e2e subdirectories (#9065) * Added test project to fdc (#8924) * Version Packages (#9073) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Release version 11.9.0. * test(ai): add integration tests (#8853) * Update issue template to rename VertexAI > AI (#9074) * ci: Fix Firefox error and streamline cross-browser tests (#9015) * Fixed issue where requestSts wasn't including the Studio cookie in it (#9075) * Fix issue where we ping an endpoint that hasn't been implemented (#9059) * Updated firebase auth changeset (#9088) * build(all): Version Packages v11.9.1 (#9089) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> v11.9.1 release. * test(ai): Upgrade mock responses to v14 (#9091) --------- Co-authored-by: Google Open Source Bot <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Maneesh Tewani <[email protected]> Co-authored-by: Mark Duckworth <[email protected]> Co-authored-by: Daniel La Rocque <[email protected]> Co-authored-by: Christina Holland <[email protected]>
1 parent 9aa887c commit 189ca45

File tree

143 files changed

+3768
-727
lines changed

Some content is hidden

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

143 files changed

+3768
-727
lines changed

.changeset/eighty-starfishes-listen.md

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

.changeset/fast-mangos-chew.md

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

.changeset/ninety-ways-dress.md

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

.changeset/perfect-camels-try.md

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

.changeset/tall-zoos-stare.md

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

.github/ISSUE_TEMPLATE/bug_report_v2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ body:
5858
description: Select the Firebase product(s) relevant to your issue. You can select multiple options in the dropdown.
5959
multiple: true
6060
options:
61+
- AI
6162
- Analytics
6263
- AppCheck
6364
- Auth
@@ -72,7 +73,6 @@ body:
7273
- Performance
7374
- Remote-Config
7475
- Storage
75-
- VertexAI
7676
validations:
7777
required: true
7878
- type: textarea

.github/workflows/e2e-test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030

3131
defaults:
3232
run:
33-
# Run any command steps in the /e2e subdir
34-
working-directory: './e2e'
33+
# Run any command steps in the /e2e/smoke-tests subdir
34+
working-directory: './e2e/smoke-tests'
3535

3636
steps:
3737
- name: Checkout Repo
@@ -53,7 +53,9 @@ jobs:
5353
- name: Poll npm until version to test is available for install
5454
run: |
5555
echo "Polling npm for firebase@${{ github.event.client_payload.versionOrTag }}"
56-
node ../scripts/release/poll-npm-publish.js
56+
node ./scripts/release/poll-npm-publish.js
57+
# run in root
58+
working-directory: '.'
5759
env:
5860
VERSION: ${{ github.event.client_payload.versionOrTag }}
5961
- name: Yarn install

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ vertexai-sdk-test-data
103103
mocks-lookup.ts
104104

105105
# temp changeset output
106-
changeset-temp.json
106+
changeset-temp.json

.vscode/launch.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "node",
1010
"request": "launch",
1111
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
12-
"cwd": "${workspaceRoot}/packages/vertexai",
12+
"cwd": "${workspaceRoot}/packages/ai",
1313
"args": [
1414
"--require",
1515
"ts-node/register",
@@ -24,6 +24,26 @@
2424
},
2525
"sourceMaps": true
2626
},
27+
{
28+
"name": "AI Integration Tests (node)",
29+
"type": "node",
30+
"request": "launch",
31+
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
32+
"cwd": "${workspaceRoot}/packages/ai",
33+
"args": [
34+
"--require",
35+
"ts-node/register",
36+
"--require",
37+
"src/index.node.ts",
38+
"--timeout",
39+
"5000",
40+
"integration/**/*.test.ts"
41+
],
42+
"env": {
43+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
44+
},
45+
"sourceMaps": true
46+
},
2747
{
2848
"type": "node",
2949
"request": "launch",

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ and follow the instructions to login.
143143

144144
For more information, visit https://firebase.google.com/docs/storage/web/download-files#cors_configuration
145145

146+
Then, make sure you have anonymous sign-in provider enabled:
147+
146148
#### Authentication Support
147149

148150
Visit the authentication config in your project and enable the `Anonymous`

common/api-review/ai.api.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ export enum HarmBlockThreshold {
518518
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
519519
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
520520
BLOCK_NONE = "BLOCK_NONE",
521-
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH"
521+
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
522+
OFF = "OFF"
522523
}
523524

524525
// @public
@@ -790,6 +791,9 @@ export abstract class Schema implements SchemaInterface {
790791
format?: string;
791792
// (undocumented)
792793
static integer(integerParams?: SchemaParams): IntegerSchema;
794+
items?: SchemaInterface;
795+
maxItems?: number;
796+
minItems?: number;
793797
nullable: boolean;
794798
// (undocumented)
795799
static number(numberParams?: SchemaParams): NumberSchema;
@@ -831,10 +835,16 @@ export interface SchemaShared<T> {
831835
example?: unknown;
832836
format?: string;
833837
items?: T;
838+
maximum?: number;
839+
maxItems?: number;
840+
minimum?: number;
841+
minItems?: number;
834842
nullable?: boolean;
835843
properties?: {
836844
[k: string]: T;
837845
};
846+
propertyOrdering?: string[];
847+
title?: string;
838848
}
839849

840850
// @public

config/karma.base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const config = {
6868
// test results reporter to use
6969
// possible values: 'dots', 'progress'
7070
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
71-
reporters: ['mocha', 'coverage-istanbul'],
71+
reporters: ['coverage-istanbul', 'mocha'],
7272

7373
// web server port
7474
port: 8089,

docs-devsite/ai.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,13 @@ export declare const enum AIErrorCode
448448
| INVALID\_CONTENT | <code>&quot;invalid-content&quot;</code> | An error associated with a Content object. |
449449
| INVALID\_SCHEMA | <code>&quot;invalid-schema&quot;</code> | An error due to invalid Schema input. |
450450
| NO\_API\_KEY | <code>&quot;no-api-key&quot;</code> | An error occurred due to a missing Firebase API key. |
451-
| NO\_APP\_ID | <code>&quot;no-app-id&quot;</code> | An error occured due to a missing Firebase app ID. |
451+
| NO\_APP\_ID | <code>&quot;no-app-id&quot;</code> | An error occurred due to a missing Firebase app ID. |
452452
| NO\_MODEL | <code>&quot;no-model&quot;</code> | An error occurred due to a model name not being specified during initialization. |
453453
| NO\_PROJECT\_ID | <code>&quot;no-project-id&quot;</code> | An error occurred due to a missing project ID. |
454454
| PARSE\_FAILED | <code>&quot;parse-failed&quot;</code> | An error occurred while parsing. |
455455
| REQUEST\_ERROR | <code>&quot;request-error&quot;</code> | An error occurred in a request. |
456456
| RESPONSE\_ERROR | <code>&quot;response-error&quot;</code> | An error occurred in a response. |
457-
| UNSUPPORTED | <code>&quot;unsupported&quot;</code> | An error occured due an attempt to use an unsupported feature. |
457+
| UNSUPPORTED | <code>&quot;unsupported&quot;</code> | An error occurred due an attempt to use an unsupported feature. |
458458

459459
## BlockReason
460460

@@ -551,6 +551,7 @@ export declare enum HarmBlockThreshold
551551
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | Content with <code>NEGLIGIBLE</code> and <code>LOW</code> will be allowed. |
552552
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | All content will be allowed. |
553553
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | Content with <code>NEGLIGIBLE</code>, <code>LOW</code>, and <code>MEDIUM</code> will be allowed. |
554+
| OFF | <code>&quot;OFF&quot;</code> | All content will be allowed. This is the same as <code>BLOCK_NONE</code>, but the metadata corresponding to the [HarmCategory](./ai.md#harmcategory) will not be present in the response. |
554555

555556
## HarmCategory
556557

docs-devsite/ai.schema.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export declare abstract class Schema implements SchemaInterface
3232
| [description](./ai.schema.md#schemadescription) | | string | Optional. The description of the property. |
3333
| [example](./ai.schema.md#schemaexample) | | unknown | Optional. The example of the property. |
3434
| [format](./ai.schema.md#schemaformat) | | string | Optional. The format of the property. Supported formats:<br/> <ul> <li>for NUMBER type: "float", "double"</li> <li>for INTEGER type: "int32", "int64"</li> <li>for STRING type: "email", "byte", etc</li> </ul> |
35+
| [items](./ai.schema.md#schemaitems) | | [SchemaInterface](./ai.schemainterface.md#schemainterface_interface) | Optional. The items of the property. |
36+
| [maxItems](./ai.schema.md#schemamaxitems) | | number | The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
37+
| [minItems](./ai.schema.md#schemaminitems) | | number | The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
3538
| [nullable](./ai.schema.md#schemanullable) | | boolean | Optional. Whether the property is nullable. Defaults to false. |
3639
| [type](./ai.schema.md#schematype) | | [SchemaType](./ai.md#schematype) | Optional. The type of the property. [SchemaType](./ai.md#schematype)<!-- -->. |
3740
@@ -93,6 +96,36 @@ Optional. The format of the property. Supported formats:<br/> <ul> <li>for NUMBE
9396
format?: string;
9497
```
9598
99+
## Schema.items
100+
101+
Optional. The items of the property.
102+
103+
<b>Signature:</b>
104+
105+
```typescript
106+
items?: SchemaInterface;
107+
```
108+
109+
## Schema.maxItems
110+
111+
The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.
112+
113+
<b>Signature:</b>
114+
115+
```typescript
116+
maxItems?: number;
117+
```
118+
119+
## Schema.minItems
120+
121+
The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.
122+
123+
<b>Signature:</b>
124+
125+
```typescript
126+
minItems?: number;
127+
```
128+
96129
## Schema.nullable
97130
98131
Optional. Whether the property is nullable. Defaults to false.

docs-devsite/ai.schemashared.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ export interface SchemaShared<T>
2727
| [example](./ai.schemashared.md#schemasharedexample) | unknown | Optional. The example of the property. |
2828
| [format](./ai.schemashared.md#schemasharedformat) | string | Optional. The format of the property. When using the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->), this must be either <code>'enum'</code> or <code>'date-time'</code>, otherwise requests will fail. |
2929
| [items](./ai.schemashared.md#schemashareditems) | T | Optional. The items of the property. |
30+
| [maximum](./ai.schemashared.md#schemasharedmaximum) | number | The maximum value of a numeric type. |
31+
| [maxItems](./ai.schemashared.md#schemasharedmaxitems) | number | The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
32+
| [minimum](./ai.schemashared.md#schemasharedminimum) | number | The minimum value of a numeric type. |
33+
| [minItems](./ai.schemashared.md#schemasharedminitems) | number | The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
3034
| [nullable](./ai.schemashared.md#schemasharednullable) | boolean | Optional. Whether the property is nullable. |
3135
| [properties](./ai.schemashared.md#schemasharedproperties) | { \[k: string\]: T; } | Optional. Map of <code>Schema</code> objects. |
36+
| [propertyOrdering](./ai.schemashared.md#schemasharedpropertyordering) | string\[\] | A hint suggesting the order in which the keys should appear in the generated JSON string. |
37+
| [title](./ai.schemashared.md#schemasharedtitle) | string | The title of the property. This helps document the schema's purpose but does not typically constrain the generated value. It can subtly guide the model by clarifying the intent of a field. |
3238

3339
## SchemaShared.description
3440

@@ -80,6 +86,46 @@ Optional. The items of the property.
8086
items?: T;
8187
```
8288

89+
## SchemaShared.maximum
90+
91+
The maximum value of a numeric type.
92+
93+
<b>Signature:</b>
94+
95+
```typescript
96+
maximum?: number;
97+
```
98+
99+
## SchemaShared.maxItems
100+
101+
The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.
102+
103+
<b>Signature:</b>
104+
105+
```typescript
106+
maxItems?: number;
107+
```
108+
109+
## SchemaShared.minimum
110+
111+
The minimum value of a numeric type.
112+
113+
<b>Signature:</b>
114+
115+
```typescript
116+
minimum?: number;
117+
```
118+
119+
## SchemaShared.minItems
120+
121+
The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.
122+
123+
<b>Signature:</b>
124+
125+
```typescript
126+
minItems?: number;
127+
```
128+
83129
## SchemaShared.nullable
84130

85131
Optional. Whether the property is nullable.
@@ -101,3 +147,23 @@ properties?: {
101147
[k: string]: T;
102148
};
103149
```
150+
151+
## SchemaShared.propertyOrdering
152+
153+
A hint suggesting the order in which the keys should appear in the generated JSON string.
154+
155+
<b>Signature:</b>
156+
157+
```typescript
158+
propertyOrdering?: string[];
159+
```
160+
161+
## SchemaShared.title
162+
163+
The title of the property. This helps document the schema's purpose but does not typically constrain the generated value. It can subtly guide the model by clarifying the intent of a field.
164+
165+
<b>Signature:</b>
166+
167+
```typescript
168+
title?: string;
169+
```

0 commit comments

Comments
 (0)