LanguageModelCallOptions
Namespace: Vercel.AI.Provider
public sealed class LanguageModelCallOptionsSettings for one language-model call. Property names follow the V4 call options.
Inheritance: object
Properties
Section titled “Properties”AbortSignal
Section titled “AbortSignal”public AbortSignal? AbortSignal { get; set; }Aborts when the call is aborted. It carries the reason, for example a TimeoutError for an expired timeout.
Set only when the call has a timeout or a AbortSignal. The CancellationToken of the call is cancelled at the same time. Maps to abortSignal.
Value: AbortSignal
FrequencyPenalty
Section titled “FrequencyPenalty”public double? FrequencyPenalty { get; set; }Frequency penalty.
Value: double?
Headers
Section titled “Headers”public IReadOnlyDictionary<string, string?>? Headers { get; set; }Extra HTTP headers for this call.
Value: IReadOnlyDictionary<string, string>
IncludeRawChunks
Section titled “IncludeRawChunks”public bool IncludeRawChunks { get; set; }When true, the stream includes one raw provider chunk for each event.
Value: bool
JsonResponse
Section titled “JsonResponse”public bool JsonResponse { get; set; }Asks for a JSON response without a schema. Maps to responseFormat: { type: 'json' } with no schema. Providers send json_object or the matching format. Ignored when JsonSchema is set.
Value: bool
JsonSchema
Section titled “JsonSchema”public JsonElement? JsonSchema { get; set; }JSON schema when structured output is requested.
Value: JsonElement?
JsonSchemaDescription
Section titled “JsonSchemaDescription”public string? JsonSchemaDescription { get; set; }Response format description. Maps to responseFormat.description.
Value: string
JsonSchemaName
Section titled “JsonSchemaName”public string? JsonSchemaName { get; set; }Schema name sent to providers that require one.
Value: string
MaxOutputTokens
Section titled “MaxOutputTokens”public int? MaxOutputTokens { get; set; }Maximum tokens to generate. Maps to maxOutputTokens.
Value: int?
PresencePenalty
Section titled “PresencePenalty”public double? PresencePenalty { get; set; }Presence penalty.
Value: double?
Prompt
Section titled “Prompt”public IReadOnlyList<ModelMessage> Prompt { get; set; }Prompt messages.
Value: IReadOnlyList<ModelMessage>
ProviderOptions
Section titled “ProviderOptions”public IReadOnlyDictionary<string, JsonElement>? ProviderOptions { get; set; }Provider-specific options, keyed by provider name.
Value: IReadOnlyDictionary<string, JsonElement>
Reasoning
Section titled “Reasoning”public string? Reasoning { get; set; }Reasoning effort for providers that accept it: none, minimal, low, medium, high, xhigh, or max.
Value: string
public int? Seed { get; set; }Random seed.
Value: int?
StopSequences
Section titled “StopSequences”public IReadOnlyList<string>? StopSequences { get; set; }Stop sequences.
Value: IReadOnlyList<string>
Temperature
Section titled “Temperature”public double? Temperature { get; set; }Sampling temperature.
Value: double?
ToolChoice
Section titled “ToolChoice”public ToolChoice? ToolChoice { get; set; }Tool selection mode.
Value: ToolChoice
public IReadOnlyList<LanguageModelTool>? Tools { get; set; }Tools the model may call.
Value: IReadOnlyList<LanguageModelTool>
public int? TopK { get; set; }Top-k sampling.
Value: int?
public double? TopP { get; set; }Nucleus sampling.
Value: double?
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product