class

Smith::Tools::ReadFile

Inherits Smith::Tools::ParallelTool < Smith::Tools::Tool < Reference < Object

Constants

MAX_BYTES = 256 * 1024

Constructors

new(max_media_bytes : Int32 = Smith::Media::DEFAULT_MAX_BYTES)

The same ceiling an @-mention uses, [media] max_bytes. How a file got into the context says nothing about what it costs once it is there.

Source

Instance methods

description
Source
name
Source
parameters
Source
run(args : JSON::Any) : String
Source
run_with_media(args : JSON::Any) : Tuple(String, Array(Smith::LLM::ContentBlock)) | Nil

Never nil: a text read must not go down the fallback path, or the registry would call run afterwards and read the same file twice.

Source