Class: RubyLLM::Toolbox::Tools::ProcessOutput
- Defined in:
- lib/ruby_llm/toolbox/tools/process_output.rb
Overview
SAFE. Returns the output a background process has produced since the last read, plus its current status (running, or exited with a code). Reads are incremental, so polling in a loop streams the process’s output without repeats.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#call, exec_tool!, exec_tool?, #initialize, #name
Constructor Details
This class inherits a constructor from RubyLLM::Toolbox::Base
Instance Method Details
#execute(id:) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/ruby_llm/toolbox/tools/process_output.rb', line 22 def execute(id:) proc = ProcessRegistry.get(id) return error("no such process: #{id}", code: :not_found) unless proc data = proc.read_new truncate(format_output(proc, data)) end |