struct

Anthropic::FileSource

Inherits JSON::Serializable < Struct < Value < Object

File-based document source (references uploaded file by ID)

# Upload a file first
file = client.beta.files.upload(Path["document.pdf"])

# Reference it in a message
source = Anthropic::FileSource.new(file.id)

Constructors

new(file_id : String)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

file_id
Source
type
Source