Class: LittleGhost::CodeMode::StopTool
- 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 ExecTool
Methods inherited from Tool
#agent, available?, available_if, #close, define, description, exclusive, #exclusive?, #execute, #initialize, 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
355 356 357 358 359 360 361 |
# File 'lib/little_ghost/code_mode/runtime.rb', line 355 def call(input) result = agent.code_mode_runtime.stop( context:, **{max_output_tokens: input["max_output_tokens"]}.compact ) serialize(result) end |
#description ⇒ Object
363 |
# File 'lib/little_ghost/code_mode/runtime.rb', line 363 def description = agent.render_framework_prompt("code_mode/tools/stop/description") |
#input_schema ⇒ Object
365 |
# File 'lib/little_ghost/code_mode/runtime.rb', line 365 def input_schema = schema_with_description("code_mode/tools/stop/inputs/max_output_tokens/description") |