Class: Phronomy::Agent::ToolApprovalRequest::Item
- Inherits:
-
Object
- Object
- Phronomy::Agent::ToolApprovalRequest::Item
- Defined in:
- lib/phronomy/agent/tool_approval_request.rb
Overview
One ToolInvocation included in a batch approval request.
Instance Attribute Summary collapse
- #arguments ⇒ Object readonly
- #facts ⇒ Object readonly
- #metadata ⇒ Object readonly
- #origin ⇒ Object readonly
- #reason ⇒ Object readonly
- #tool_call_id ⇒ Object readonly
- #tool_invocation_id ⇒ Object readonly
- #tool_name ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(tool_invocation_id:, tool_call_id:, tool_name:, arguments:, facts:, reason:, origin:, metadata:) ⇒ Item
constructor
A new instance of Item.
- #to_h ⇒ Object
Constructor Details
#initialize(tool_invocation_id:, tool_call_id:, tool_name:, arguments:, facts:, reason:, origin:, metadata:) ⇒ Item
Returns a new instance of Item.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 27 def initialize( tool_invocation_id:, tool_call_id:, tool_name:, arguments:, facts:, reason:, origin:, metadata: ) @tool_invocation_id = tool_invocation_id.to_s.freeze @tool_call_id = tool_call_id&.to_s&.freeze @tool_name = tool_name.to_s.freeze @arguments = immutable_copy(arguments) @facts = immutable_copy(facts) @reason = reason&.to_s&.freeze @origin = origin.to_sym @metadata = immutable_copy() freeze end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def arguments @arguments end |
#facts ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def facts @facts end |
#metadata ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def @metadata end |
#origin ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def origin @origin end |
#reason ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def reason @reason end |
#tool_call_id ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def tool_call_id @tool_call_id end |
#tool_invocation_id ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def tool_invocation_id @tool_invocation_id end |
#tool_name ⇒ Object (readonly)
18 19 20 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 18 def tool_name @tool_name end |
Instance Method Details
#to_h ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/phronomy/agent/tool_approval_request.rb', line 48 def to_h { tool_invocation_id: @tool_invocation_id, tool_call_id: @tool_call_id, tool_name: @tool_name, arguments: @arguments, facts: @facts, reason: @reason, origin: @origin, metadata: @metadata } end |