Class: OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint

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

Overview

See Also:

  • OpenAI::Models::Beta::BetaResponseInputFileContent#prompt_cache_breakpoint

Defined Under Namespace

Modules: Ttl

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(ttl: nil, mode: :explicit) ⇒ PromptCacheBreakpoint

Returns a new instance of PromptCacheBreakpoint.

Parameters:

  • ttl (defaults to: nil) —

    The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

  • mode (defaults to: :explicit) —

    The breakpoint mode. Always explicit.

  • ttl: (OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::ttl) (defaults to: nil)
  • mode: (:explicit) (defaults to: :explicit)


# File 'lib/openai/models/beta/beta_response_input_file_content.rb', line 121

Instance Attribute Details

#mode ⇒ :explicit

The breakpoint mode. Always explicit.

Returns:

  • (:explicit)


113
# File 'lib/openai/models/beta/beta_response_input_file_content.rb', line 113

required :mode, const: :explicit

#ttl ⇒ OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::ttl?

The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

Returns:

  • (OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::ttl, nil)


119
# File 'lib/openai/models/beta/beta_response_input_file_content.rb', line 119

optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::Ttl }

Instance Method Details

#to_hash ⇒ { ?mode: :explicit, ?ttl: OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::ttl }

Returns:

  • ({ ?mode: :explicit, ?ttl: OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::ttl })


133
134
135
136
# File 'sig/openai/models/beta/beta_response_input_file_content.rbs', line 133

def to_hash: -> {
  ?mode: :explicit,
  ?ttl: OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::ttl
}