summarize
Generate a summary of the conversation. The service rate limits this per conversation.
Parameters
conversationId
The conversation to summarize.
options
Prompt and sampling controls.
options.summaryPrompt
How to summarize. Overrides the post-prompt text in your SWML for this call only.
options.temperature
Sampling temperature.
options.topP
Nucleus-sampling top-p.
options.frequencyPenalty
Frequency penalty.
options.presencePenalty
Presence penalty.
options.maxTokens
Maximum tokens for the summary.
Returns
Promise<string> — the generated summary.
Throws
SummaryError when the service reports that generation failed. The service
returns exactly one of summary or error, both on the success envelope, so a
failed summary surfaces as an exception rather than reaching you as an empty
string. RateLimitError when you exceed the per-conversation limit.