Class: LittleGhost::CodeMode::ExecTool
- Defined in:
- lib/little_ghost/code_mode/runtime.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Tool
Instance Attribute Summary
Attributes inherited from Tool
Instance Method Summary collapse
Methods inherited from Tool
#agent, available?, available_if, #close, define, description, exclusive, #exclusive?, #execute, #initialize, input_schema, #input_schema, #model, #run, #runtime, #sandbox, 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
270 271 272 273 274 275 276 277 278 279 |
# File 'lib/little_ghost/code_mode/runtime.rb', line 270 def call(input) result = agent.code_mode_runtime.execute( source: input.fetch("source"), context:, **{ max_output_tokens: input["max_output_tokens"] }.compact ) serialize(result) end |
#description ⇒ Object
281 |
# File 'lib/little_ghost/code_mode/runtime.rb', line 281 def description = agent.render_framework_prompt("code_mode/tools/exec/description") |
#specification ⇒ Object
283 |
# File 'lib/little_ghost/code_mode/runtime.rb', line 283 def specification = {name: tool_name, description:, input_schema:}.freeze |