One change
Automatically handles tool execution loop
cli-sdks-libraries/sdks/ruby
Nearest release: v2.1.238, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
cli-sdks-libraries/sdks/ruby Changed · +3 / -3 lines
from line 237
require "pathname" # Use `Pathname` to send the filename and/or avoid paging a large file into memory: -file_metadata = anthropic.beta.files.upload(file: Pathname("/path/to/file")) +file_metadata = anthropic.files.upload(file: Pathname("/path/to/file")) # Alternatively, pass file contents or a `StringIO` directly: -file_metadata = anthropic.beta.files.upload(file: File.read("/path/to/file")) +file_metadata = anthropic.files.upload(file: File.read("/path/to/file")) # Or, to control the filename and/or content type: file = Anthropic::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "...") -file_metadata = anthropic.beta.files.upload(file: file) +file_metadata = anthropic.files.upload(file: file) puts(file_metadata.id) ```