Class ThreadCreateAndRunParams.TruncationStrategy
- 
                    
                    - All Implemented Interfaces:
 
 public final class ThreadCreateAndRunParams.TruncationStrategyControls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classThreadCreateAndRunParams.TruncationStrategy.BuilderA builder for TruncationStrategy. public final classThreadCreateAndRunParams.TruncationStrategy.TypeThe truncation strategy to use for the thread. The default is auto. If set tolast_messages, the thread will be truncated to the n most recent messages in the thread. When set toauto, messages in the middle of the thread will be dropped to fit the context length of the model,max_prompt_tokens.
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final ThreadCreateAndRunParams.TruncationStrategy.Typetype()The truncation strategy to use for the thread. final Optional<Long>lastMessages()The number of most recent messages from the thread when constructing the context for the run. final JsonField<ThreadCreateAndRunParams.TruncationStrategy.Type>_type()Returns the raw JSON value of type. final JsonField<Long>_lastMessages()Returns the raw JSON value of lastMessages. final Map<String, JsonValue>_additionalProperties()final ThreadCreateAndRunParams.TruncationStrategy.BuildertoBuilder()final ThreadCreateAndRunParams.TruncationStrategyvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ThreadCreateAndRunParams.TruncationStrategy.Builderbuilder()Returns a mutable builder for constructing an instance of TruncationStrategy. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        typefinal ThreadCreateAndRunParams.TruncationStrategy.Type type() The truncation strategy to use for the thread. The default is auto. If set tolast_messages, the thread will be truncated to the n most recent messages in the thread. When set toauto, messages in the middle of the thread will be dropped to fit the context length of the model,max_prompt_tokens.
 - 
                                        lastMessagesfinal Optional<Long> lastMessages() The number of most recent messages from the thread when constructing the context for the run. 
 - 
                                        _typefinal JsonField<ThreadCreateAndRunParams.TruncationStrategy.Type> _type() Returns the raw JSON value of type. Unlike type, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _lastMessagesfinal JsonField<Long> _lastMessages() Returns the raw JSON value of lastMessages. Unlike lastMessages, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _additionalPropertiesfinal Map<String, JsonValue> _additionalProperties() 
 - 
                                        toBuilderfinal ThreadCreateAndRunParams.TruncationStrategy.Builder toBuilder() 
 - 
                                        validatefinal ThreadCreateAndRunParams.TruncationStrategy validate() 
 - 
                                        builderfinal static ThreadCreateAndRunParams.TruncationStrategy.Builder builder() Returns a mutable builder for constructing an instance of TruncationStrategy. The following fields are required: .type()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-