Skip to content

StreamTextOptions

Namespace: Vercel.AI

public sealed class StreamTextOptions : GenerateTextOptions

Options for CancellationToken).

Inheritance: object → GenerateTextOptions

View source

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

View source

public StreamTextInclude? Include { get; set; }

What to retain of the request in the StartStepPart. Maps to include.

Value: StreamTextInclude

View source

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.

Value: Func<StreamAbortContext, CancellationToken, Task>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product