Class: Cadenya::Models::ObjectiveInfo

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/objective_info.rb,
sig/cadenya/models/objective_info.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(agent:, agent_variation:, created_by:, current_context_window_id:, effective_memory_cascade:, total_context_windows:, total_events:, total_input_tokens:, total_iterations:, total_output_tokens:, total_tool_calls:) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::ObjectiveInfo for more details.

ObjectiveInfo provides read-only aggregated statistics about an objective's execution

Parameters:

  • agent (Cadenya::Models::ResourceMetadata)

    Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

  • agent_variation (Cadenya::Models::ResourceMetadata)

    Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

  • created_by (Cadenya::Models::Profile)

    A profile identifies a user or non-human principal (such as an API key)

  • current_context_window_id (String)

    ID of the objective's current (most recent) context window. Hydrated on

  • effective_memory_cascade (Array<Cadenya::Models::MemoryReference>)

    The effective memory cascade at objective creation time: the

  • total_context_windows (Integer)

    Total number of context windows that this objective has generated

  • total_events (Integer)

    Total number of events generated during this objective's execution

  • total_input_tokens (Integer)

    Total input tokens consumed across all LLM completions across all context window

  • total_iterations (Integer)
  • total_output_tokens (Integer)

    Total output tokens generated across all LLM completions across all context wind

  • total_tool_calls (Integer)

    Total number of tool calls made during execution



# File 'lib/cadenya/models/objective_info.rb', line 85

Instance Attribute Details

#agentCadenya::ResourceMetadata

Returns the value of attribute agent.



21
22
23
# File 'sig/cadenya/models/objective_info.rbs', line 21

def agent
  @agent
end

#agent_variationCadenya::ResourceMetadata

Returns the value of attribute agent_variation.



23
24
25
# File 'sig/cadenya/models/objective_info.rbs', line 23

def agent_variation
  @agent_variation
end

#created_byCadenya::Models::Profile

A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.

Parameters:

Returns:



12
# File 'lib/cadenya/models/objective_info.rb', line 12

required :created_by, -> { Cadenya::Profile }, api_name: :createdBy

#current_context_window_idString

Returns the value of attribute current_context_window_id.

Returns:

  • (String)


25
26
27
# File 'sig/cadenya/models/objective_info.rbs', line 25

def current_context_window_id
  @current_context_window_id
end

#effective_memory_cascade::Array[Cadenya::MemoryReference]

Returns the value of attribute effective_memory_cascade.

Returns:



27
28
29
# File 'sig/cadenya/models/objective_info.rbs', line 27

def effective_memory_cascade
  @effective_memory_cascade
end

#total_context_windowsInteger

Returns the value of attribute total_context_windows.

Returns:

  • (Integer)


29
30
31
# File 'sig/cadenya/models/objective_info.rbs', line 29

def total_context_windows
  @total_context_windows
end

#total_eventsInteger

Returns the value of attribute total_events.

Returns:

  • (Integer)


31
32
33
# File 'sig/cadenya/models/objective_info.rbs', line 31

def total_events
  @total_events
end

#total_input_tokensInteger

Returns the value of attribute total_input_tokens.

Returns:

  • (Integer)


33
34
35
# File 'sig/cadenya/models/objective_info.rbs', line 33

def total_input_tokens
  @total_input_tokens
end

#total_iterationsInteger

Returns the value of attribute total_iterations.

Returns:

  • (Integer)


35
36
37
# File 'sig/cadenya/models/objective_info.rbs', line 35

def total_iterations
  @total_iterations
end

#total_output_tokensInteger

Returns the value of attribute total_output_tokens.

Returns:

  • (Integer)


37
38
39
# File 'sig/cadenya/models/objective_info.rbs', line 37

def total_output_tokens
  @total_output_tokens
end

#total_tool_callsInteger

Returns the value of attribute total_tool_calls.

Returns:

  • (Integer)


39
40
41
# File 'sig/cadenya/models/objective_info.rbs', line 39

def total_tool_calls
  @total_tool_calls
end

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/cadenya/models/objective_info.rbs', line 55

def to_hash: -> {