class RubyLLM::DownloadedFile

A DownloadedFile contains a provider file’s bytes. Save it with save or read the bytes with to_blob. It is also a String, so parsers and existing string operations work directly on the result.

RubyLLM.download(file.id, provider: :openai).save("report.pdf")