Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/tools / / truncateBody
Function: truncateBody()
ts
function truncateBody(opts): Promise<TruncationOutcome>;Defined in: packages/tools/src/result/truncate.ts:123
Apply the per-strategy truncation pipeline.
Parameters
| Parameter | Type |
|---|---|
opts | { body: string; maxTokens: number; options?: TruncateOptions; strategy: TruncationStrategy; } |
opts.body | string |
opts.maxTokens | number |
opts.options? | TruncateOptions |
opts.strategy | TruncationStrategy |
Returns
Promise<TruncationOutcome>