Class: OpenAI::Models::StaticFileChunkingStrategy

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/static_file_chunking_strategy.rb,
sig/openai/models/static_file_chunking_strategy.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_with_error, 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(chunk_overlap_tokens:, max_chunk_size_tokens:) ⇒ Object

Parameters:

  • chunk_overlap_tokens —

    The number of tokens that overlap between chunks. The default value is 400.

    Note that the overlap must not exceed half of max_chunk_size_tokens.

  • max_chunk_size_tokens —

    The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096.



# File 'lib/openai/models/static_file_chunking_strategy.rb', line 21

Instance Attribute Details

#chunk_overlap_tokens ⇒ Integer

The number of tokens that overlap between chunks. The default value is 400.

Note that the overlap must not exceed half of max_chunk_size_tokens.

Returns:

  • (Integer)


12
# File 'lib/openai/models/static_file_chunking_strategy.rb', line 12

required :chunk_overlap_tokens, Integer

#max_chunk_size_tokens ⇒ Integer

The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096.

Returns:

  • (Integer)


19
# File 'lib/openai/models/static_file_chunking_strategy.rb', line 19

required :max_chunk_size_tokens, Integer

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


28
# File 'sig/openai/models/static_file_chunking_strategy.rbs', line 28

def to_hash: -> {