Class: Cadenya::Types::ObjectiveToolCall
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveToolCall
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#execution_status ⇒ Object
readonly
Returns the value of attribute execution_status.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, data: nil, status: nil, info: nil, execution_status: nil) ⇒ ObjectiveToolCall
constructor
A new instance of ObjectiveToolCall.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, data: nil, status: nil, info: nil, execution_status: nil) ⇒ ObjectiveToolCall
Returns a new instance of ObjectiveToolCall.
4100 4101 4102 4103 4104 4105 4106 |
# File 'lib/cadenya/types.rb', line 4100 def initialize(metadata: nil, data: nil, status: nil, info: nil, execution_status: nil) @metadata = @data = data @status = status @info = info @execution_status = execution_status end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4098 4099 4100 |
# File 'lib/cadenya/types.rb', line 4098 def data @data end |
#execution_status ⇒ Object (readonly)
Returns the value of attribute execution_status.
4098 4099 4100 |
# File 'lib/cadenya/types.rb', line 4098 def execution_status @execution_status end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
4098 4099 4100 |
# File 'lib/cadenya/types.rb', line 4098 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4098 4099 4100 |
# File 'lib/cadenya/types.rb', line 4098 def @metadata end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4098 4099 4100 |
# File 'lib/cadenya/types.rb', line 4098 def status @status end |
Class Method Details
.from_json(data) ⇒ Object
4108 4109 4110 4111 4112 4113 4114 4115 4116 |
# File 'lib/cadenya/types.rb', line 4108 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::OperationMetadata.from_json(data["metadata"]), data: data["data"].nil? ? nil : Types::ObjectiveToolCallData.from_json(data["data"]), status: data["status"], info: data["info"].nil? ? nil : Types::ObjectiveToolCallInfo.from_json(data["info"]), execution_status: data["executionStatus"], ) end |
Instance Method Details
#to_h ⇒ Object
4118 4119 4120 4121 4122 4123 4124 4125 4126 |
# File 'lib/cadenya/types.rb', line 4118 def to_h { metadata: Util.plain(@metadata), data: Util.plain(@data), status: Util.plain(@status), info: Util.plain(@info), execution_status: Util.plain(@execution_status), }.reject { |_k, v| v.nil? } end |