Skip to content

Commit 497727f

Browse files
committed
Generate devsite docs
1 parent 180f091 commit 497727f

20 files changed

+316
-228
lines changed

common/api-review/vertexai.api.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,10 @@ export enum HarmSeverity {
432432

433433
// @public
434434
export enum ImagenAspectRatio {
435-
// (undocumented)
436435
LANDSCAPE_16x9 = "16:9",
437-
// (undocumented)
438436
LANDSCAPE_3x4 = "3:4",
439-
// (undocumented)
440437
PORTRAIT_4x3 = "4:3",
441-
// (undocumented)
442438
PORTRAIT_9x16 = "9:16",
443-
// (undocumented)
444439
SQUARE = "1:1"
445440
}
446441

@@ -465,10 +460,8 @@ export interface ImagenGenerationConfig {
465460

466461
// @public
467462
export class ImagenImageFormat {
468-
// (undocumented)
469463
compressionQuality?: number;
470464
static jpeg(compressionQuality: number): ImagenImageFormat;
471-
// (undocumented)
472465
mimeType: string;
473466
static png(): ImagenImageFormat;
474467
}
@@ -821,7 +814,7 @@ export const enum VertexAIErrorCode {
821814
export class VertexAIModel {
822815
// @internal
823816
protected constructor(vertexAI: VertexAI, modelName: string);
824-
// (undocumented)
817+
// @internal (undocumented)
825818
protected _apiSettings: ApiSettings;
826819
readonly model: string;
827820
static normalizeModelName(modelName: string): string;

docs-devsite/_toc.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,6 @@ toc:
536536
path: /docs/reference/js/vertexai.imagengenerationconfig.md
537537
- title: ImagenImageFormat
538538
path: /docs/reference/js/vertexai.imagenimageformat.md
539-
- title: ImagenImageReponse
540-
path: /docs/reference/js/vertexai.imagenimagereponse.md
541539
- title: ImagenInlineImage
542540
path: /docs/reference/js/vertexai.imageninlineimage.md
543541
- title: ImagenInlineImageResponse
@@ -568,8 +566,6 @@ toc:
568566
path: /docs/reference/js/vertexai.requestoptions.md
569567
- title: RetrievedContextAttribution
570568
path: /docs/reference/js/vertexai.retrievedcontextattribution.md
571-
- title: SafetyAttributes
572-
path: /docs/reference/js/vertexai.safetyattributes.md
573569
- title: SafetyRating
574570
path: /docs/reference/js/vertexai.safetyrating.md
575571
- title: SafetySetting
@@ -600,6 +596,8 @@ toc:
600596
path: /docs/reference/js/vertexai.vertexai.md
601597
- title: VertexAIError
602598
path: /docs/reference/js/vertexai.vertexaierror.md
599+
- title: VertexAIModel
600+
path: /docs/reference/js/vertexai.vertexaimodel.md
603601
- title: VertexAIOptions
604602
path: /docs/reference/js/vertexai.vertexaioptions.md
605603
- title: VideoMetadata

docs-devsite/vertexai.generativemodel.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ Class for generative model APIs.
1515
<b>Signature:</b>
1616

1717
```typescript
18-
export declare class GenerativeModel
18+
export declare class GenerativeModel extends VertexAIModel
1919
```
20+
<b>Extends:</b> [VertexAIModel](./vertexai.vertexaimodel.md#vertexaimodel_class)
2021
2122
## Constructors
2223
@@ -29,7 +30,6 @@ export declare class GenerativeModel
2930
| Property | Modifiers | Type | Description |
3031
| --- | --- | --- | --- |
3132
| [generationConfig](./vertexai.generativemodel.md#generativemodelgenerationconfig) | | [GenerationConfig](./vertexai.generationconfig.md#generationconfig_interface) | |
32-
| [model](./vertexai.generativemodel.md#generativemodelmodel) | | string | |
3333
| [requestOptions](./vertexai.generativemodel.md#generativemodelrequestoptions) | | [RequestOptions](./vertexai.requestoptions.md#requestoptions_interface) | |
3434
| [safetySettings](./vertexai.generativemodel.md#generativemodelsafetysettings) | | [SafetySetting](./vertexai.safetysetting.md#safetysetting_interface)<!-- -->\[\] | |
3535
| [systemInstruction](./vertexai.generativemodel.md#generativemodelsysteminstruction) | | [Content](./vertexai.content.md#content_interface) | |
@@ -71,14 +71,6 @@ constructor(vertexAI: VertexAI, modelParams: ModelParams, requestOptions?: Reque
7171
generationConfig: GenerationConfig;
7272
```
7373
74-
## GenerativeModel.model
75-
76-
<b>Signature:</b>
77-
78-
```typescript
79-
model: string;
80-
```
81-
8274
## GenerativeModel.requestOptions
8375
8476
<b>Signature:</b>

docs-devsite/vertexai.imagengcsimage.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,37 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenGCSImage interface
13-
Image generated by Imagen, stored in Google Cloud Storage (GCS).
13+
An image generated by Imagen, stored in Google Cloud Storage (GCS).
1414

1515
<b>Signature:</b>
1616

1717
```typescript
18-
export interface ImagenGCSImage extends ImagenImage
18+
export interface ImagenGCSImage
1919
```
20-
<b>Extends:</b> ImagenImage
2120

2221
## Properties
2322

2423
| Property | Type | Description |
2524
| --- | --- | --- |
26-
| [gcsURI](./vertexai.imagengcsimage.md#imagengcsimagegcsuri) | string | The Google Cloud Storage (GCS) URI at which the generated image is stored. |
25+
| [gcsURI](./vertexai.imagengcsimage.md#imagengcsimagegcsuri) | string | The Google Cloud Storage (GCS) URI where the image is stored. |
26+
| [mimeType](./vertexai.imagengcsimage.md#imagengcsimagemimetype) | string | The MIME type of the image. |
2727

2828
## ImagenGCSImage.gcsURI
2929

30-
The Google Cloud Storage (GCS) URI at which the generated image is stored.
30+
The Google Cloud Storage (GCS) URI where the image is stored.
3131

3232
<b>Signature:</b>
3333

3434
```typescript
3535
gcsURI: string;
3636
```
37+
38+
## ImagenGCSImage.mimeType
39+
40+
The MIME type of the image.
41+
42+
<b>Signature:</b>
43+
44+
```typescript
45+
mimeType: string;
46+
```

docs-devsite/vertexai.imagengcsimageresponse.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenGCSImageResponse interface
13+
The response from a request to generate images to Google Cloud Storage (GCS).
14+
1315
<b>Signature:</b>
1416

1517
```typescript
@@ -20,11 +22,13 @@ export interface ImagenGCSImageResponse
2022

2123
| Property | Type | Description |
2224
| --- | --- | --- |
23-
| [filteredReason](./vertexai.imagengcsimageresponse.md#imagengcsimageresponsefilteredreason) | string | |
24-
| [images](./vertexai.imagengcsimageresponse.md#imagengcsimageresponseimages) | [ImagenGCSImage](./vertexai.imagengcsimage.md#imagengcsimage_interface)<!-- -->\[\] | |
25+
| [filteredReason](./vertexai.imagengcsimageresponse.md#imagengcsimageresponsefilteredreason) | string | The reason why any images were filtered. This field is only present if one or more images were filtered. For the mappings of error codes to reasons, see [https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen\#safety-categories](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-categories)<!-- -->. |
26+
| [images](./vertexai.imagengcsimageresponse.md#imagengcsimageresponseimages) | [ImagenGCSImage](./vertexai.imagengcsimage.md#imagengcsimage_interface)<!-- -->\[\] | The images generated by Imagen. If all images were filtered due to safety reasons, this array will be empty. |
2527

2628
## ImagenGCSImageResponse.filteredReason
2729

30+
The reason why any images were filtered. This field is only present if one or more images were filtered. For the mappings of error codes to reasons, see [https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen\#safety-categories](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-categories)<!-- -->.
31+
2832
<b>Signature:</b>
2933

3034
```typescript
@@ -33,6 +37,8 @@ filteredReason?: string;
3337

3438
## ImagenGCSImageResponse.images
3539

40+
The images generated by Imagen. If all images were filtered due to safety reasons, this array will be empty.
41+
3642
<b>Signature:</b>
3743

3844
```typescript

docs-devsite/vertexai.imagengenerationconfig.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# ImagenGenerationConfig interface
13+
Request-level configuration options for generating images with Imagen.
14+
1315
<b>Signature:</b>
1416

1517
```typescript
@@ -20,12 +22,14 @@ export interface ImagenGenerationConfig
2022

2123
| Property | Type | Description |
2224
| --- | --- | --- |
23-
| [aspectRatio](./vertexai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./vertexai.md#imagenaspectratio) | |
24-
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | |
25-
| [numberOfImages](./vertexai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | |
25+
| [aspectRatio](./vertexai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./vertexai.md#imagenaspectratio) | The aspect ratio of the generated images. Defaults to <code>1:1</code>. |
26+
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | A text prompt describing what should not be included in the image. |
27+
| [numberOfImages](./vertexai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | The number of images to generate. Must be between 1 and 4. Defaults to 1. |
2628

2729
## ImagenGenerationConfig.aspectRatio
2830

31+
The aspect ratio of the generated images. Defaults to `1:1`<!-- -->.
32+
2933
<b>Signature:</b>
3034

3135
```typescript
@@ -34,6 +38,8 @@ aspectRatio?: ImagenAspectRatio;
3438

3539
## ImagenGenerationConfig.negativePrompt
3640

41+
A text prompt describing what should not be included in the image.
42+
3743
<b>Signature:</b>
3844

3945
```typescript
@@ -42,6 +48,8 @@ negativePrompt?: string;
4248

4349
## ImagenGenerationConfig.numberOfImages
4450

51+
The number of images to generate. Must be between 1 and 4. Defaults to 1.
52+
4553
<b>Signature:</b>
4654

4755
```typescript

docs-devsite/vertexai.imagenimageformat.md

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,35 @@ overwritten. Changes should be made in the source code at
99
https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

12-
# ImagenImageFormat interface
12+
# ImagenImageFormat class
13+
Defines the image format for images output by Imagen.
14+
15+
Use this class to specify the desired format (JPEG or PNG) and compression quality for images generated by Imagen. This is typically included as part of [ImagenModelParams](./vertexai.imagenmodelparams.md#imagenmodelparams_interface)<!-- -->.
16+
1317
<b>Signature:</b>
1418

1519
```typescript
16-
export interface ImagenImageFormat
20+
export declare class ImagenImageFormat
1721
```
1822

1923
## Properties
2024

21-
| Property | Type | Description |
25+
| Property | Modifiers | Type | Description |
26+
| --- | --- | --- | --- |
27+
| [compressionQuality](./vertexai.imagenimageformat.md#imagenimageformatcompressionquality) | | number | The level of compression (a number between 0 and 100). |
28+
| [mimeType](./vertexai.imagenimageformat.md#imagenimageformatmimetype) | | string | The MIME type. |
29+
30+
## Methods
31+
32+
| Method | Modifiers | Description |
2233
| --- | --- | --- |
23-
| [compressionQuality](./vertexai.imagenimageformat.md#imagenimageformatcompressionquality) | number | |
24-
| [mimeType](./vertexai.imagenimageformat.md#imagenimageformatmimetype) | string | |
34+
| [jpeg(compressionQuality)](./vertexai.imagenimageformat.md#imagenimageformatjpeg) | <code>static</code> | Creates an ImagenImageFormat for a JPEG image. |
35+
| [png()](./vertexai.imagenimageformat.md#imagenimageformatpng) | <code>static</code> | Creates an ImageImageFormat for a PNG image. |
2536

2637
## ImagenImageFormat.compressionQuality
2738

39+
The level of compression (a number between 0 and 100).
40+
2841
<b>Signature:</b>
2942

3043
```typescript
@@ -33,8 +46,59 @@ compressionQuality?: number;
3346

3447
## ImagenImageFormat.mimeType
3548

49+
The MIME type.
50+
3651
<b>Signature:</b>
3752

3853
```typescript
3954
mimeType: string;
4055
```
56+
57+
## ImagenImageFormat.jpeg()
58+
59+
Creates an ImagenImageFormat for a JPEG image.
60+
61+
<b>Signature:</b>
62+
63+
```typescript
64+
static jpeg(compressionQuality: number): ImagenImageFormat;
65+
```
66+
67+
#### Parameters
68+
69+
| Parameter | Type | Description |
70+
| --- | --- | --- |
71+
| compressionQuality | number | The level of compression (a number between 0 and 100). |
72+
73+
<b>Returns:</b>
74+
75+
[ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class)
76+
77+
ImagenImageFormat
78+
79+
## ImagenImageFormat.png()
80+
81+
Creates an ImageImageFormat for a PNG image.
82+
83+
<b>Signature:</b>
84+
85+
```typescript
86+
static png(): ImagenImageFormat;
87+
```
88+
<b>Returns:</b>
89+
90+
[ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class)
91+
92+
ImageImageFormat
93+
94+
### Example
95+
96+
97+
```javascript
98+
const imagenModelParams = {
99+
// ... other ImagenModelParams
100+
imageFormat: ImagenImageFormat.jpeg(75) // JPEG with a compression level of 75.
101+
}
102+
103+
```
104+

docs-devsite/vertexai.imagenimagereponse.md

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

0 commit comments

Comments
 (0)