Skip to content

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

ParameterType
opts{ body: string; maxTokens: number; options?: TruncateOptions; strategy: TruncationStrategy; }
opts.bodystring
opts.maxTokensnumber
opts.options?TruncateOptions
opts.strategyTruncationStrategy

Returns

Promise&lt;TruncationOutcome&gt;

Stable