StreamTextOptions
Namespace: Vercel.AI
public sealed class StreamTextOptions : GenerateTextOptionsOptions for CancellationToken).
Inheritance: object → GenerateTextOptions
Properties
Section titled “Properties”AbortSignal
Section titled “AbortSignal”public AbortSignal? AbortSignal { get; set; }Aborts the call and carries the reason. Use it instead of the CancellationToken when the reason matters.
A reason that is an Exception faults the results as is. Maps to abortSignal.
Value: AbortSignal
Include
Section titled “Include”public StreamTextInclude? Include { get; set; }What to retain of the request in the StartStepPart. Maps to include.
Value: StreamTextInclude
OnAbort
Section titled “OnAbort”public Func<StreamAbortContext, CancellationToken, Task>? OnAbort { get; set; }Called after the call is aborted, with the steps that finished before it. It does not delay the rejection of the
results. The stream ends with an AbortPart after it returns. OnError and
OnFinish are not called. Maps to onAbort.
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product