Skip to content

[OPENAI] Support editing images with gpt-image-1 and the paint method #324

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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

tpaulshippy
Copy link
Contributor

@tpaulshippy tpaulshippy commented Aug 4, 2025

What this does

Enable image editing with OpenAI's gpt-image-1 model using the images/edit endpoint.
Just do RubyLLM.paint "make it nicer", with: "ugly_image.png"

Type of change

  • New feature

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
  • I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Changed method signatures

Related issues

Built on top of #152 based on feedback there

sbounmy and others added 26 commits April 27, 2025 15:19
…ith-image

* 'main' of github.com:crmne/ruby_llm: (24 commits)
  Enhance Rails guide with detailed persistence flow explanation and setup instructions
  Remove work-in-progress warning from models documentation generation
  Add validation considerations for Message model and update persistence flow documentation
  Add note about upcoming OpenAI headers support in v1.3.0
  Handle OpenAI organization and project IDs (crmne#162)
  Refactor acts_as_message and acts_as_tool_call methods to improve parameter handling and default values
  Remove reasoning section from available models documentation and rake task
  Remove debug logging for pricing in OpenRouter models
  Updated models page
  Fixed pricing parsing for OpenRouter
  Updated models
  Add warning about work in progress for Parsera integration in available models documentation
  Major refactoring of ModelInfo and Parsera API support for listing LLM capabilities and pricing.
  Fix inflector (crmne#159)
  Use foreign_key instead of to_s for acts_as methods (crmne#157)
  Fixes #embed fails when using default embedding model
  Add support for logging to file via configuration (crmne#148)
  Updated acts_as_* helpers to use canonical 'rails-style' foreign keys (crmne#151)
  refactor(media): streamline content formatting methods across providers
  Fixed Calling `chat.to_llm` keeps appending messages to the message array
  ...
@@ -8110,7 +8110,6 @@
"text_tokens": {
"standard": {
"input_per_million": 5.0,
"cached_input_per_million": 1.25,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this relates to this PR. Should remove.

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

Successfully merging this pull request may close these issues.

2 participants