Skip to content

Fix Attachment#save for binary IO#700

Open
Gujiassh wants to merge 1 commit intocrmne:mainfrom
Gujiassh:fix/attachment-binary-save
Open

Fix Attachment#save for binary IO#700
Gujiassh wants to merge 1 commit intocrmne:mainfrom
Gujiassh:fix/attachment-binary-save

Conversation

@Gujiassh
Copy link

Summary

  • make Attachment#save rewind IO sources and write them in binary mode
  • add regression coverage to ensure binary payloads are saved byte-for-byte without an added newline

Testing

  • bundle exec rspec spec/ruby_llm/attachment_spec.rb
  • bundle exec rubocop lib/ruby_llm/attachment.rb spec/ruby_llm/attachment_spec.rb

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.

1 participant