Skip to content

Commit

Permalink
Export generate-media to types/index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
junyanxu committed Oct 18, 2024
1 parent dd69509 commit e152efe
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 3 deletions.
9 changes: 7 additions & 2 deletions common/api-review/generative-ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,13 @@ export interface GenerateContentStreamResult {
stream: AsyncGenerator<EnhancedGenerateContentResponse>;
}

// @public
export interface GeneratedImage {
// Warning: (ae-forgotten-export) The symbol "PredictServiceValueType" needs to be exported by the entry point index.d.ts
generationParameters?: PredictServiceValueType;
imageBytes?: string;
}

// @public
export interface GenerationConfig {
// (undocumented)
Expand Down Expand Up @@ -656,8 +663,6 @@ export interface ImageGenerationRequest {

// @public
export interface ImageGenerationResponse {
// Warning: (ae-forgotten-export) The symbol "GeneratedImage" needs to be exported by the entry point index.d.ts
//
// (undocumented)
images: GeneratedImage[];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@google/generative-ai](./generative-ai.md) &gt; [GeneratedImage](./generative-ai.generatedimage.md) &gt; [generationParameters](./generative-ai.generatedimage.generationparameters.md)

## GeneratedImage.generationParameters property

Generation parameters.

**Signature:**

```typescript
generationParameters?: PredictServiceValueType;
```
13 changes: 13 additions & 0 deletions docs/reference/main/generative-ai.generatedimage.imagebytes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@google/generative-ai](./generative-ai.md) &gt; [GeneratedImage](./generative-ai.generatedimage.md) &gt; [imageBytes](./generative-ai.generatedimage.imagebytes.md)

## GeneratedImage.imageBytes property

Image bytes.

**Signature:**

```typescript
imageBytes?: string;
```
21 changes: 21 additions & 0 deletions docs/reference/main/generative-ai.generatedimage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@google/generative-ai](./generative-ai.md) &gt; [GeneratedImage](./generative-ai.generatedimage.md)

## GeneratedImage interface

Generated images. It will be returned in response.

**Signature:**

```typescript
export interface GeneratedImage
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [generationParameters?](./generative-ai.generatedimage.generationparameters.md) | | PredictServiceValueType | _(Optional)_ Generation parameters. |
| [imageBytes?](./generative-ai.generatedimage.imagebytes.md) | | string | _(Optional)_ Image bytes. |

Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface ImageGenerationResponse

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [images](./generative-ai.imagegenerationresponse.images.md) | | GeneratedImage\[\] | |
| [images](./generative-ai.imagegenerationresponse.images.md) | | [GeneratedImage](./generative-ai.generatedimage.md)<!-- -->\[\] | |

1 change: 1 addition & 0 deletions docs/reference/main/generative-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
| [GenerateContentResponse](./generative-ai.generatecontentresponse.md) | Individual response from [GenerativeModel.generateContent()](./generative-ai.generativemodel.generatecontent.md) and [GenerativeModel.generateContentStream()](./generative-ai.generativemodel.generatecontentstream.md)<!-- -->. <code>generateContentStream()</code> will return one in each chunk until the stream is done. |
| [GenerateContentResult](./generative-ai.generatecontentresult.md) | Result object returned from generateContent() call. |
| [GenerateContentStreamResult](./generative-ai.generatecontentstreamresult.md) | Result object returned from generateContentStream() call. Iterate over <code>stream</code> to get chunks as they come in and/or use the <code>response</code> promise to get the aggregated response when the stream is done. |
| [GeneratedImage](./generative-ai.generatedimage.md) | Generated images. It will be returned in response. |
| [GenerationConfig](./generative-ai.generationconfig.md) | Config options for content-related requests |
| [GenerativeContentBlob](./generative-ai.generativecontentblob.md) | Interface for sending an image. |
| [GoogleSearchRetrieval](./generative-ai.googlesearchretrieval.md) | Retrieval tool that is powered by Google search. |
Expand Down
1 change: 1 addition & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export * from "./enums";
export * from "./requests";
export * from "./responses";
export * from "./search-grounding";
export * from "./generated-media";
export { CachedContent, CachedContentBase } from "./server/caching";

0 comments on commit e152efe

Please sign in to comment.