按令牌截斷

將文字剪切到估計的代幣預算。

截斷為大約 maxTokens × 4 個字元。與上下文視窗 % 不同,它編輯文字。與令牌估計不同,它會傳回縮短的字串。僅限本地。

結果: A long prompt that may need trimming for the context window.

代幣(大約): 15

人物: 60

截斷(1 = 是): 0