Skip to content

[FEATURE] Support for attached files in the paint call #512

Description

@fguillen

What problem does this solve?

I can not attach files to the image generation prompt. It prevents me to use files as part of the prompt context, or to suggest image styles to follow.

When asking to generate an image:

RubyLLM.paint("Generate a happy birthday postcard")

I would like to attach reference files and images:

RubyLLM.paint("Generate a happy birthday postcard, use the person in the attached file", with: "myfriend.png")
RubyLLM.paint("Generate a cover image from the article I am attaching, with: "article.pdf")
RubyLLM.paint("Generate an illustration of a dog following the style of the attached images, with: ["illustration1.png", "illustration2.png"])

Proposed solution

Support the with param, like in the ask method

Why this belongs in RubyLLM

It is common use for all image generators to allow files and reference images in the prompt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions