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

🚀 Feature Request : Add Support for Image Generation Models #26

Open
detunjiSamuel opened this issue Jan 10, 2025 · 1 comment
Open

Comments

@detunjiSamuel
Copy link

detunjiSamuel commented Jan 10, 2025

🔖 Feature description

The current Hub only supports chat_completion, completion, and embeddings operations, which doesn't fit well with image-focused AI providers like Stability AI that offer text-to-image and image-to-image capabilities.

🎤 Why is this feature needed?

Adding support for these image operations would make Hub more versatile and allow users to maintain the OpenAI format while utilizing image capabilities from providers like Stability AI using the OpenAI format in (https://platform.openai.com/docs/guides/images).

✌️ How do you aim to achieve this?

Implement new API endpoints to support image operations, allowing integration with providers that specialize in image generation and transformation.

👀 Have you spent some time to check if this feature request has been raised before?

Yes, I've checked and didn't find similar issues.

Are you willing to submit PR?

Yes , I am willing to submit a PR!

Conversation Context: #25

Search for "I think it should be in a new API" in link above ( Github does not allow links to highlights 🥲 )

@detunjiSamuel detunjiSamuel changed the title Add Support for Image Generation Models 🚀 Feature Request : Add Support for Image Generation Models Jan 16, 2025
@detunjiSamuel
Copy link
Author

Not sure if this is something in Hub's vision of features to prioritize but here's how I would go about it:

  1. I would be making changes to src/pipelines/pipeline.rs to include routes supporting the following endpoints from the OpenAI image docs (OpenAI docs):
  • /images/generations

  • /images/edits

  • /images/variations

  1. Adding appropriate definitions for the expected request/response in src/models/

  2. Editing src/ai_models/instance.rs to include support for the 3 new formats in ModelInstance

  3. Updating the provider trait to be aware of these new options that providers could support

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