Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (ai/core): add experimental generateImage function #4056

Merged
merged 29 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
openai
  • Loading branch information
lgrammel committed Dec 10, 2024
commit 4c420036990a7ee9ee694915db3c147b0c9af239
22 changes: 18 additions & 4 deletions content/providers/01-ai-sdk-providers/01-openai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,8 @@ The following optional settings are available for OpenAI completion models:
| `o1-mini` | <Cross size={18} /> | <Cross size={18} /> | <Cross size={18} /> | <Cross size={18} /> |

<Note>
The table above lists popular models. Please see the [OpenAI
docs](https://platform.openai.com/docs/models) for a full list of available
models. The table above lists popular models. You can also pass any available
provider model ID as a string if needed.
The table above lists popular models. You can also pass any available provider
model ID as a string if needed.
</Note>

## Embedding Models
Expand Down Expand Up @@ -561,3 +559,19 @@ The following optional settings are available for OpenAI embedding models:
| `text-embedding-3-large` | 3072 | <Check size={18} /> |
| `text-embedding-3-small` | 1536 | <Check size={18} /> |
| `text-embedding-ada-002` | 1536 | <Cross size={18} /> |

## Image Models

You can create models that call the [OpenAI image generation API](https://platform.openai.com/docs/api-reference/images)
using the `.image()` factory method.

```ts
const model = openai.image('dall-e-3');
```

### Model Capabilities

| Model | Supported Sizes |
| ---------- | ------------------------------- |
| `dall-e-3` | 1024x1024, 1792x1024, 1024x1792 |
| `dall-e-2` | 256x256, 512x512, 1024x1024 |
Loading