Class: Cadenya::Types::ObjectiveInfo
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveInfo
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#agent_variation ⇒ Object
readonly
Returns the value of attribute agent_variation.
-
#created_by ⇒ Object
readonly
Returns the value of attribute created_by.
-
#current_context_window_id ⇒ Object
readonly
Returns the value of attribute current_context_window_id.
-
#effective_memory_cascade ⇒ Object
readonly
Returns the value of attribute effective_memory_cascade.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#tenant ⇒ Object
readonly
Returns the value of attribute tenant.
-
#total_context_windows ⇒ Object
readonly
Returns the value of attribute total_context_windows.
-
#total_events ⇒ Object
readonly
Returns the value of attribute total_events.
-
#total_input_tokens ⇒ Object
readonly
Returns the value of attribute total_input_tokens.
-
#total_iterations ⇒ Object
readonly
Returns the value of attribute total_iterations.
-
#total_output_tokens ⇒ Object
readonly
Returns the value of attribute total_output_tokens.
-
#total_tool_calls ⇒ Object
readonly
Returns the value of attribute total_tool_calls.
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(total_events: nil, total_tool_calls: nil, total_input_tokens: nil, total_output_tokens: nil, total_context_windows: nil, total_iterations: nil, created_by: nil, effective_memory_cascade: nil, agent: nil, agent_variation: nil, current_context_window_id: nil, tenant: nil, subject: nil, widget: nil) ⇒ ObjectiveInfo
constructor
A new instance of ObjectiveInfo.
- #to_h ⇒ Object
Constructor Details
#initialize(total_events: nil, total_tool_calls: nil, total_input_tokens: nil, total_output_tokens: nil, total_context_windows: nil, total_iterations: nil, created_by: nil, effective_memory_cascade: nil, agent: nil, agent_variation: nil, current_context_window_id: nil, tenant: nil, subject: nil, widget: nil) ⇒ ObjectiveInfo
Returns a new instance of ObjectiveInfo.
3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 |
# File 'lib/cadenya/types.rb', line 3942 def initialize(total_events: nil, total_tool_calls: nil, total_input_tokens: nil, total_output_tokens: nil, total_context_windows: nil, total_iterations: nil, created_by: nil, effective_memory_cascade: nil, agent: nil, agent_variation: nil, current_context_window_id: nil, tenant: nil, subject: nil, widget: nil) @total_events = total_events @total_tool_calls = total_tool_calls @total_input_tokens = total_input_tokens @total_output_tokens = total_output_tokens @total_context_windows = total_context_windows @total_iterations = total_iterations @created_by = created_by @effective_memory_cascade = effective_memory_cascade @agent = agent @agent_variation = agent_variation @current_context_window_id = current_context_window_id @tenant = tenant @subject = subject @widget = end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def agent @agent end |
#agent_variation ⇒ Object (readonly)
Returns the value of attribute agent_variation.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def agent_variation @agent_variation end |
#created_by ⇒ Object (readonly)
Returns the value of attribute created_by.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def created_by @created_by end |
#current_context_window_id ⇒ Object (readonly)
Returns the value of attribute current_context_window_id.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def current_context_window_id @current_context_window_id end |
#effective_memory_cascade ⇒ Object (readonly)
Returns the value of attribute effective_memory_cascade.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def effective_memory_cascade @effective_memory_cascade end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def subject @subject end |
#tenant ⇒ Object (readonly)
Returns the value of attribute tenant.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def tenant @tenant end |
#total_context_windows ⇒ Object (readonly)
Returns the value of attribute total_context_windows.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def total_context_windows @total_context_windows end |
#total_events ⇒ Object (readonly)
Returns the value of attribute total_events.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def total_events @total_events end |
#total_input_tokens ⇒ Object (readonly)
Returns the value of attribute total_input_tokens.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def total_input_tokens @total_input_tokens end |
#total_iterations ⇒ Object (readonly)
Returns the value of attribute total_iterations.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def total_iterations @total_iterations end |
#total_output_tokens ⇒ Object (readonly)
Returns the value of attribute total_output_tokens.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def total_output_tokens @total_output_tokens end |
#total_tool_calls ⇒ Object (readonly)
Returns the value of attribute total_tool_calls.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def total_tool_calls @total_tool_calls end |
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
3940 3941 3942 |
# File 'lib/cadenya/types.rb', line 3940 def @widget end |
Class Method Details
.from_json(data) ⇒ Object
3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 |
# File 'lib/cadenya/types.rb', line 3959 def self.from_json(data) new( total_events: data["totalEvents"], total_tool_calls: data["totalToolCalls"], total_input_tokens: data["totalInputTokens"], total_output_tokens: data["totalOutputTokens"], total_context_windows: data["totalContextWindows"], total_iterations: data["totalIterations"], created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]), effective_memory_cascade: data["effectiveMemoryCascade"].nil? ? nil : (data["effectiveMemoryCascade"]).map { |item| Types::MemoryReference.from_json(item) }, agent: data["agent"].nil? ? nil : Types::ResourceMetadata.from_json(data["agent"]), agent_variation: data["agentVariation"].nil? ? nil : Types::ResourceMetadata.from_json(data["agentVariation"]), current_context_window_id: data["currentContextWindowId"], tenant: data["tenant"].nil? ? nil : Types::TenantReference.from_json(data["tenant"]), subject: data["subject"].nil? ? nil : Types::SubjectReference.from_json(data["subject"]), widget: data["widget"].nil? ? nil : Types::BareMetadata.from_json(data["widget"]), ) end |
Instance Method Details
#to_h ⇒ Object
3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 |
# File 'lib/cadenya/types.rb', line 3978 def to_h { total_events: Util.plain(@total_events), total_tool_calls: Util.plain(@total_tool_calls), total_input_tokens: Util.plain(@total_input_tokens), total_output_tokens: Util.plain(@total_output_tokens), total_context_windows: Util.plain(@total_context_windows), total_iterations: Util.plain(@total_iterations), created_by: Util.plain(@created_by), effective_memory_cascade: Util.plain(@effective_memory_cascade), agent: Util.plain(@agent), agent_variation: Util.plain(@agent_variation), current_context_window_id: Util.plain(@current_context_window_id), tenant: Util.plain(@tenant), subject: Util.plain(@subject), widget: Util.plain(@widget), }.reject { |_k, v| v.nil? } end |