Class: LittleGhost::Tools::Filesystem::WriteFile
- Inherits:
-
LittleGhost::Tool
- Object
- LittleGhost::Tool
- LittleGhost::Tools::Filesystem::WriteFile
- Defined in:
- lib/little_ghost/tools/filesystem.rb
Overview
Writes one UTF-8 text file through a writable sandbox.
Direct Known Subclasses
Constant Summary
Constants inherited from LittleGhost::Tool
LittleGhost::Tool::UNSET_RESULT_VALUE
Instance Attribute Summary
Attributes inherited from LittleGhost::Tool
Instance Method Summary collapse
Methods inherited from LittleGhost::Tool
#agent, available?, available_if, #close, define, description, exclusive, #exclusive?, #execute, #initialize, input_schema, #input_schema, #model, #run, #runtime, #sandbox, specification, #specification, tool_name, #tool_name, #workspace
Methods included from Support::ClassAttributes
Constructor Details
This class inherits a constructor from LittleGhost::Tool
Instance Method Details
#call(input) ⇒ Object
61 62 63 |
# File 'lib/little_ghost/tools/filesystem.rb', line 61 def call(input) sandbox.write(input.fetch("path"), input.fetch("content"), context:) end |
#description ⇒ Object
65 |
# File 'lib/little_ghost/tools/filesystem.rb', line 65 def description = framework_prompt("tools/built_in/write_file/description") |