TruncationObject interface
用于指示在运行之前如何截断线程的控件。 使用此控件可控制运行的初始上下文窗口。
属性
| last |
构造运行上下文时线程中的最新消息数。 |
| type | 用于线程的截断策略。 默认值为 |
属性详细信息
lastMessages
构造运行上下文时线程中的最新消息数。
lastMessages?: null | number
属性值
null | number
type
用于线程的截断策略。 默认值为 auto。 如果设置为 last_messages,则线程将被截断为线程中最新消息的 lastMessages 计数。 设置为 auto 时,将删除线程中间的消息,以适应模型的上下文长度 max_prompt_tokens。
type: TruncationStrategy