Class: Cadenya::Models::ObjectiveContextWindowData

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/objective_context_window_data.rb,
sig/cadenya/models/objective_context_window_data.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(completion_tokens: nil, objective_id: nil, previous_window_continue_instructions: nil, prompt_tokens: nil, sequence: nil) ⇒ Object

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

Parameters:

  • completion_tokens (Integer) (defaults to: nil)

    A calculated value for how many completion tokens (output tokens) have been used

  • objective_id (String) (defaults to: nil)

    The objective's ID that this window belongs to

  • previous_window_continue_instructions (String) (defaults to: nil)

    The instructions for this window to continue from a previous window's chat histo

  • prompt_tokens (Integer) (defaults to: nil)

    A calculated value for how many prompt tokens (input tokens) have been used in t

  • sequence (Integer) (defaults to: nil)

    sequence is a numeric representation of which context window this is. Sequences



# File 'lib/cadenya/models/objective_context_window_data.rb', line 43

Instance Attribute Details

#completion_tokensInteger? (readonly)

Returns the value of attribute completion_tokens.

Returns:

  • (Integer, nil)


17
18
19
# File 'sig/cadenya/models/objective_context_window_data.rbs', line 17

def completion_tokens
  @completion_tokens
end

#objective_idString? (readonly)

Returns the value of attribute objective_id.

Returns:

  • (String, nil)


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

def objective_id
  @objective_id
end

#previous_window_continue_instructionsString?

The instructions for this window to continue from a previous window's chat history.

Parameters:

  • (String)

Returns:

  • (String, nil)


11
# File 'lib/cadenya/models/objective_context_window_data.rb', line 11

optional :previous_window_continue_instructions, String, api_name: :previousWindowContinueInstructions

#prompt_tokensInteger? (readonly)

Returns the value of attribute prompt_tokens.

Returns:

  • (Integer, nil)


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

def prompt_tokens
  @prompt_tokens
end

#sequenceInteger? (readonly)

Returns the value of attribute sequence.

Returns:

  • (Integer, nil)


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

def sequence
  @sequence
end

Instance Method Details

#completion_tokens=Integer (readonly)

Parameters:

  • (Integer)

Returns:

  • (Integer)


19
# File 'sig/cadenya/models/objective_context_window_data.rbs', line 19

def completion_tokens=: (Integer) -> Integer

#objective_id=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


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

def objective_id=: (String) -> String

#prompt_tokens=Integer (readonly)

Parameters:

  • (Integer)

Returns:

  • (Integer)


27
# File 'sig/cadenya/models/objective_context_window_data.rbs', line 27

def prompt_tokens=: (Integer) -> Integer

#sequence=Integer (readonly)

Parameters:

  • (Integer)

Returns:

  • (Integer)


31
# File 'sig/cadenya/models/objective_context_window_data.rbs', line 31

def sequence=: (Integer) -> Integer

#to_hash{

Returns:

  • ({)


41
# File 'sig/cadenya/models/objective_context_window_data.rbs', line 41

def to_hash: -> {