Class: Roast::Cogs::Agent::Providers::Claude::ToolUse
- Inherits:
-
Object
- Object
- Roast::Cogs::Agent::Providers::Claude::ToolUse
- Defined in:
- lib/roast/cogs/agent/providers/claude/tool_use.rb
Constant Summary collapse
- TRUNCATE_LIMIT =
Truncate long formatted tool-use strings to keep terminal output to generally one line, accounting for logger prefixing.
45
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
: Hash[Symbol, untyped].
-
#name ⇒ Object
readonly
: Symbol.
Instance Method Summary collapse
-
#format ⇒ Object
: () -> String.
-
#initialize(name:, input:) ⇒ ToolUse
constructor
: (name: Symbol, input: Hash[Symbol, untyped]) -> void.
Constructor Details
#initialize(name:, input:) ⇒ ToolUse
: (name: Symbol, input: Hash[Symbol, untyped]) -> void
17 18 19 20 |
# File 'lib/roast/cogs/agent/providers/claude/tool_use.rb', line 17 def initialize(name:, input:) @name = name @input = input end |
Instance Attribute Details
#input ⇒ Object (readonly)
: Hash[Symbol, untyped]
14 15 16 |
# File 'lib/roast/cogs/agent/providers/claude/tool_use.rb', line 14 def input @input end |
#name ⇒ Object (readonly)
: Symbol
11 12 13 |
# File 'lib/roast/cogs/agent/providers/claude/tool_use.rb', line 11 def name @name end |
Instance Method Details
#format ⇒ Object
: () -> String
23 24 25 26 27 28 |
# File 'lib/roast/cogs/agent/providers/claude/tool_use.rb', line 23 def format format_method_name = "format_#{name}".to_sym return send(format_method_name) if respond_to?(format_method_name, true) format_unknown end |