Skip to content

ExtractionModelCall

Namespace: Vercel.AI.Operations

public sealed class ExtractionModelCall

Arguments for doExtract. Maps to ExtractionModelV4CallOptions.

Inheritance: object

View source

ExtractionModelCall(IReadOnlyList<DecisionModelStatePart>, IReadOnlyDictionary<string, ExtractionField>, JsonElement, IReadOnlyDictionary<string, string>, CancellationToken, string?, double?, string?)

Section titled “ExtractionModelCall(IReadOnlyList<DecisionModelStatePart>, IReadOnlyDictionary<string, ExtractionField>, JsonElement, IReadOnlyDictionary<string, string>, CancellationToken, string?, double?, string?)”
public ExtractionModelCall(IReadOnlyList<DecisionModelStatePart> state, IReadOnlyDictionary<string, ExtractionField> fields, JsonElement providerOptions, IReadOnlyDictionary<string, string> headers, CancellationToken cancellationToken, string? referenceDate = null, double? maxOutputTokens = null, string? reasoning = null)

Creates a call.

Parameters

Name Type Description
state IReadOnlyList<DecisionModelStatePart>
fields IReadOnlyDictionary<string, ExtractionField>
providerOptions JsonElement
headers IReadOnlyDictionary<string, string>
cancellationToken CancellationToken
referenceDate string
maxOutputTokens double?
reasoning string

View source

public CancellationToken CancellationToken { get; }

Cancellation token.

Value: CancellationToken

View source

public IReadOnlyDictionary<string, ExtractionField> Fields { get; }

Fields to extract.

Value: IReadOnlyDictionary<string, ExtractionField>

View source

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

Headers including the user-agent suffix.

Value: IReadOnlyDictionary<string, string>

View source

public double? MaxOutputTokens { get; }

Maximum output tokens, an integer of at least 1. Null when the caller set none.

Value: double?

View source

public JsonElement ProviderOptions { get; }

Provider options.

Value: JsonElement

View source

public string? Reasoning { get; }

Reasoning effort. Language-model adapters default to none when it is null.

Value: string

View source

public string? ReferenceDate { get; }

YYYY-MM-DD date that anchors relative dates and dates without a year.

Value: string

View source

public IReadOnlyList<DecisionModelStatePart> State { get; }

Ordered text, file, and JSON parts. Answer sources index into this list.

Value: IReadOnlyList<DecisionModelStatePart>

View source

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