Skip to content

OperationRequest

Namespace: Vercel.AI.Operations

public class OperationRequest

Shared request fields for an operation call.

Inheritance: object

Derived: BatchRequestOptions, DecideRequest, EmbedManyRequest, EmbedRequest, EvaluateRequest, GenerateImageRequest, GenerateSpeechRequest, GenerateVideoRequest, GetVideoStatusRequest, RerankRequest, StreamSpeechRequest, StreamTranscribeRequest, StreamTranslateRequest, TranscribeRequest

View source

public Exception? AbortReason { get; set; }

Exception thrown when CancellationToken is already cancelled.

Value: Exception

View source

public CancellationToken CancellationToken { get; set; }

Cancels the call.

Value: CancellationToken

View source

public Func<string>? GenerateCallId { get; set; }

Supplies call ids. Tests pass a constant generator.

Value: Func<string>

View source

public IReadOnlyDictionary<string, string>? Headers { get; set; }

Extra HTTP headers.

Value: IReadOnlyDictionary<string, string>

View source

public int? MaxRetries { get; set; }

Maximum retries after the first attempt. Default is 2.

Value: int?

View source

public Func<DateTime>? Now { get; set; }

Clock used when a provider omits a timestamp.

Value: Func<DateTime>

View source

public JsonElement? ProviderOptions { get; set; }

Provider-specific options.

Value: JsonElement?

View source

public IReadOnlyDictionary<string, object?>? RuntimeContext { get; set; }

Values copied onto user callbacks. Telemetry receives the filtered copy.

Value: IReadOnlyDictionary<string, object>

View source

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