Class: Cadenya::Models::ObjectiveDiagnostics

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/objective_diagnostics.rb,
sig/cadenya/models/objective_diagnostics.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(cached_input_tokens:, context_lengths:, input_tokens:) ⇒ Object

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

ObjectiveDiagnostics is the context-usage breakdown measured for a single iteration at request-assembly time. It reports how much of the context window each component occupies so tool parameters, memory cascades, and prompts can be tuned against real token usage.

Parameters:

  • cached_input_tokens (Integer)

    The portion of input_tokens served from the provider's prompt cache.

  • context_lengths (Cadenya::Models::ContextLengths)

    ContextLengths is the measured character length of each distinct component

  • input_tokens (Integer)

    Input tokens reported by the LLM provider for the iteration's completion.



# File 'lib/cadenya/models/objective_diagnostics.rb', line 34

Instance Attribute Details

#cached_input_tokensInteger

Returns the value of attribute cached_input_tokens.

Returns:

  • (Integer)


11
12
13
# File 'sig/cadenya/models/objective_diagnostics.rbs', line 11

def cached_input_tokens
  @cached_input_tokens
end

#context_lengthsCadenya::ContextLengths

Returns the value of attribute context_lengths.



13
14
15
# File 'sig/cadenya/models/objective_diagnostics.rbs', line 13

def context_lengths
  @context_lengths
end

#input_tokensInteger

Returns the value of attribute input_tokens.

Returns:

  • (Integer)


15
16
17
# File 'sig/cadenya/models/objective_diagnostics.rbs', line 15

def input_tokens
  @input_tokens
end

Instance Method Details

#to_hash{

Returns:

  • ({)


23
# File 'sig/cadenya/models/objective_diagnostics.rbs', line 23

def to_hash: -> {