共用方式為


TruncationObject Class

Definition

Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.

public class TruncationObject : System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.TruncationObject>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.TruncationObject>
type TruncationObject = class
    interface IJsonModel<TruncationObject>
    interface IPersistableModel<TruncationObject>
Public Class TruncationObject
Implements IJsonModel(Of TruncationObject), IPersistableModel(Of TruncationObject)
Inheritance
TruncationObject
Implements

Constructors

TruncationObject(TruncationStrategy)

Initializes a new instance of TruncationObject.

Properties

LastMessages

The number of most recent messages from the thread when constructing the context for the run.

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 lastMessages count 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.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<TruncationObject>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<TruncationObject>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<TruncationObject>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<TruncationObject>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<TruncationObject>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to