diff --git a/common/api-review/generative-ai.api.md b/common/api-review/generative-ai.api.md index c380203..6fa0ea2 100644 --- a/common/api-review/generative-ai.api.md +++ b/common/api-review/generative-ai.api.md @@ -448,6 +448,13 @@ export interface GenerateContentStreamResult { stream: AsyncGenerator; } +// @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) @@ -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[]; } diff --git a/docs/reference/main/generative-ai.generatedimage.generationparameters.md b/docs/reference/main/generative-ai.generatedimage.generationparameters.md new file mode 100644 index 0000000..b6b8ec6 --- /dev/null +++ b/docs/reference/main/generative-ai.generatedimage.generationparameters.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GeneratedImage](./generative-ai.generatedimage.md) > [generationParameters](./generative-ai.generatedimage.generationparameters.md) + +## GeneratedImage.generationParameters property + +Generation parameters. + +**Signature:** + +```typescript +generationParameters?: PredictServiceValueType; +``` diff --git a/docs/reference/main/generative-ai.generatedimage.imagebytes.md b/docs/reference/main/generative-ai.generatedimage.imagebytes.md new file mode 100644 index 0000000..26f833a --- /dev/null +++ b/docs/reference/main/generative-ai.generatedimage.imagebytes.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GeneratedImage](./generative-ai.generatedimage.md) > [imageBytes](./generative-ai.generatedimage.imagebytes.md) + +## GeneratedImage.imageBytes property + +Image bytes. + +**Signature:** + +```typescript +imageBytes?: string; +``` diff --git a/docs/reference/main/generative-ai.generatedimage.md b/docs/reference/main/generative-ai.generatedimage.md new file mode 100644 index 0000000..872b32d --- /dev/null +++ b/docs/reference/main/generative-ai.generatedimage.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [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. | + diff --git a/docs/reference/main/generative-ai.imagegenerationresponse.md b/docs/reference/main/generative-ai.imagegenerationresponse.md index 136cc42..762f9a6 100644 --- a/docs/reference/main/generative-ai.imagegenerationresponse.md +++ b/docs/reference/main/generative-ai.imagegenerationresponse.md @@ -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)\[\] | | diff --git a/docs/reference/main/generative-ai.md b/docs/reference/main/generative-ai.md index 44f0079..ed66050 100644 --- a/docs/reference/main/generative-ai.md +++ b/docs/reference/main/generative-ai.md @@ -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). generateContentStream() 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 stream to get chunks as they come in and/or use the response 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. | diff --git a/types/index.ts b/types/index.ts index a2a78f4..6810d30 100644 --- a/types/index.ts +++ b/types/index.ts @@ -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";