Class: OpenAI::Models::DecisionInputText

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

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(text:, prompt_cache_breakpoint: nil, type: :input_text) ⇒ DecisionInputText

Returns a new instance of DecisionInputText.

Parameters:

  • prompt_cache_breakpoint (defaults to: nil) —

    Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

  • text: (String)
  • prompt_cache_breakpoint: (OpenAI::DecisionPromptCacheBreakpoint, OpenAI::Models::decision_prompt_cache_breakpoint, nil) (defaults to: nil)
  • type: (:input_text) (defaults to: :input_text)


# File 'lib/openai/models/decision_input_text.rb', line 24

Instance Attribute Details

#prompt_cache_breakpoint ⇒ (OpenAI::DecisionPromptCacheBreakpoint

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.



22
# File 'lib/openai/models/decision_input_text.rb', line 22

optional :prompt_cache_breakpoint, -> { OpenAI::DecisionPromptCacheBreakpoint }, nil?: true

#text ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


9
# File 'lib/openai/models/decision_input_text.rb', line 9

required :text, String

#type ⇒ Symbol, :input_text

Parameters:

  • value (:input_text)

Returns:

  • (Symbol, :input_text)


14
# File 'lib/openai/models/decision_input_text.rb', line 14

required :type, const: :input_text

Instance Method Details

#to_hash ⇒ { text: String, ?type: :input_text, ?prompt_cache_breakpoint: (OpenAI::DecisionPromptCacheBreakpoint | OpenAI::Models::decision_prompt_cache_breakpoint)? }

Returns:



33
34
35
36
37
38
# File 'sig/openai/models/decision_input_text.rbs', line 33

def to_hash: -> {
  text: String,
  ?type: :input_text,
  ?prompt_cache_breakpoint: (OpenAI::DecisionPromptCacheBreakpoint
  | OpenAI::Models::decision_prompt_cache_breakpoint)?
}