Class: OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy
- Defined in:
- lib/openai/models/beta/threads/run_create_params.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#last_messages ⇒ Integer?
The number of most recent messages from the thread when constructing the context for the run.
-
#type ⇒ Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type
The truncation strategy to use for the thread.
Instance Method Summary collapse
-
#initialize(type: , last_messages: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see TruncationStrategy for more details.
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, 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(type: , last_messages: nil) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy for more details.
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
|
# File 'lib/openai/models/beta/threads/run_create_params.rb', line 411
|
Instance Attribute Details
#last_messages ⇒ Integer?
The number of most recent messages from the thread when constructing the context for the run.
409 |
# File 'lib/openai/models/beta/threads/run_create_params.rb', line 409 optional :last_messages, Integer, nil?: true |
#type ⇒ Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type
The truncation strategy to use for the thread. The default is ‘auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.
402 |
# File 'lib/openai/models/beta/threads/run_create_params.rb', line 402 required :type, enum: -> { OpenAI::Beta::Threads::RunCreateParams::TruncationStrategy::Type } |