struct

Anthropic::FileListResponse

Inherits JSON::Serializable < Struct < Value < Object

Response from listing files

Constructors

new(data : Array(FileMetadata), has_more : Bool = false, first_id : String | Nil = nil, last_id : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

auto_paging_all(client : Client) : Array(FileMetadata)

Fetch all files across all pages

all_files = client.beta.files.list.auto_paging_all(client)
Source
data

Array of file metadata objects

Source
first_id

ID of first file (for backward pagination)

Source
has_more?

Whether there are more files to fetch

Source
last_id

ID of last file (for forward pagination)

Source