Skip to content

Commit

Permalink
docs: update vertex-ai.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelgj authored Oct 4, 2024
1 parent 6d1b9cf commit b5ddaea
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions docs/plugins/vertex-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,33 +171,6 @@ const response = await generate({
return response.media();
```

and even advanced editing of existing images:

```js
const baseImg = fs.readFileSync('base.png', { encoding: 'base64' });
const maskImg = fs.readFileSync('mask.png', { encoding: 'base64' });

const response = await generate({
model: imagen3,
output: { format: 'media' },
prompt: [
{ media: { url: `data:image/png;base64,${baseImg}` }},
{
media: { url: `data:image/png;base64,${maskImg}` },
metadata: { type: 'mask' },
},
{ text: 'replace the background with foo bar baz' },
],
config: {
editConfig: {
editMode: 'outpainting',
},
},
});

return response.media();
```

Refer to (Imagen model documentation)[https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api#edit_images_2] for more detailed options.

#### Anthropic Claude 3 on Vertex AI Model Garden
Expand Down

0 comments on commit b5ddaea

Please sign in to comment.