/** * Provider-agnostic summarizer implementing the framework's `SummarizerLike` * interface via a Vercel AI SDK `LanguageModel`. * * Distinct from the classic `Summarizer` (`src/ai/summarizer.ts`), which * uses a structural `ChatCompletionsClient` that only fits OpenAI-shaped * SDKs. `AISDKSummarizer` swaps providers with a one-import change: * * import { AISDKSummarizer } from '@emerleite/wa-agent/ai-sdk'; * import { anthropic } from '@ai-sdk/anthropic'; * * new Agent({ * summarizer: new AISDKSummarizer({ * model: anthropic('claude-haiku-4-5'), * maxOutputTokens: 256, * }), * }); * * Any AI SDK `LanguageModel` works — swap `anthropic(...)` for `openai(...)`, * `google(...)`, `groq(...)`, `mistral(...)`, `cerebras(...)`, `deepseek(...)`, * or `@ai-sdk/openai-compatible` (LiteLLM proxy / Ollama / LM Studio) and * nothing else in your app changes. */ import { type LanguageModel } from 'ai'; import type { SummarizerLike } from '../types.js'; export interface AISDKSummarizerOptions { /** AI SDK `LanguageModel` (from `@ai-sdk/openai`, `/anthropic`, `/google`, etc.). */ model: LanguageModel; /** * System prompt. Default: a concise instruction to summarize into ≤4 * short bullets in the input's language. Override for domain-specific tone. */ systemPrompt?: string; /** `maxOutputTokens` forwarded to `generateText`. Default 400. */ maxOutputTokens?: number; /** `temperature` forwarded to `generateText`. Default 0.3 (low-variance summaries). */ temperature?: number; } export declare class AISDKSummarizer implements SummarizerLike { private readonly model; private readonly systemPrompt; private readonly maxOutputTokens; private readonly temperature; constructor(opts: AISDKSummarizerOptions); summarize(text: string): Promise; } //# sourceMappingURL=summarizer.d.ts.map