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

Add Text-to-Image Support Using OpenAI Node #401

Open
5 tasks
shige opened this issue Feb 25, 2025 · 0 comments
Open
5 tasks

Add Text-to-Image Support Using OpenAI Node #401

shige opened this issue Feb 25, 2025 · 0 comments

Comments

@shige
Copy link
Member

shige commented Feb 25, 2025

Task description

Implement text-to-image functionality in the OpenAI node to allow image generation. This involves integrating the OpenAI Images API.

Background

The OpenAI API supports image generation from text prompts via the Images API. Adding this functionality to the node will allow developers to easily integrate image generation capabilities into their applications. This feature is documented at https://platform.openai.com/docs/api-reference/images.
The Vercel AI SDK already supports this with OpenAI and their documentation can be found here: https://sdk.vercel.ai/providers/ai-sdk-providers/openai#image-models.

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

TODO (Optional)

  • Implement a function to call the OpenAI Images API with a text prompt.
  • Allow configuration of image generation parameters.
  • Handle API responses, including errors and image URLs.
  • Add appropriate documentation and examples for using the new functionality.
  • Add unit tests to ensure the image generation functionality works as expected.

Additional notes (Optional)

Consider using a similar approach to the Vercel AI SDK's implementation for image generation with OpenAI. Ensure that the implementation handles rate limiting and other potential API limitations gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant