Defined in: packages/ai/src/types.ts:1649
What TextAdapter.compact receives.
Properties#
addUsage?#
optional addUsage?: (usage) => void;
Defined in: packages/ai/src/types.ts:1668
Report the token usage of the compaction call.
Parameters#
usage#
TokenUsage
Returns#
void
messages#
messages: ModelMessage<
| string
| ContentPart<unknown, unknown, unknown, unknown, unknown>[]
| null>[];
Defined in: packages/ai/src/types.ts:1651
The history to compact.
model#
model: string;
Defined in: packages/ai/src/types.ts:1652
modelOptions?#
optional modelOptions?: Record<string, unknown>;
Defined in: packages/ai/src/types.ts:1664
Provider model options of the chat call, including max_tokens.
reasoning?#
optional reasoning?: ReasoningRequest;
Defined in: packages/ai/src/types.ts:1666
How hard the model thinks on the chat call.
signal?#
optional signal?: AbortSignal;
Defined in: packages/ai/src/types.ts:1653
systemPrompts?#
optional systemPrompts?: SystemPrompt[];
Defined in: packages/ai/src/types.ts:1657
The system prompts of the chat call.
tools?#
optional tools?: AnyTool[];
Defined in: packages/ai/src/types.ts:1662
The tools of the chat call. The provider reads the definitions. The compaction call does not run a tool.
wrapFetch?#
optional wrapFetch?: FetchWrapper;
Defined in: packages/ai/src/types.ts:1655
Wraps the fetch of the compaction request.