你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TruncationObject interface

用于指示在运行之前如何截断线程的控件。 使用此控件可控制运行的初始上下文窗口。

属性

lastMessages

构造运行上下文时线程中的最新消息数。

type

用于线程的截断策略。 默认值为 auto。 如果设置为 last_messages,则线程将被截断为线程中最新消息的 lastMessages 计数。 设置为 auto 时,将删除线程中间的消息,以适应模型的上下文长度 max_prompt_tokens

属性详细信息

lastMessages

构造运行上下文时线程中的最新消息数。

lastMessages?: null | number

属性值

null | number

type

用于线程的截断策略。 默认值为 auto。 如果设置为 last_messages,则线程将被截断为线程中最新消息的 lastMessages 计数。 设置为 auto 时,将删除线程中间的消息,以适应模型的上下文长度 max_prompt_tokens

type: TruncationStrategy

属性值