GatewayExtractionModel
Namespace: Vercel.AI.Gateway
public sealed class GatewayExtractionModel : IExtractionCallerExtracts typed field values through the Gateway /extraction-model route. Maps to GatewayExtractionModel.
Inheritance: object
Implements: IExtractionCaller
Constructors
Section titled “Constructors”GatewayExtractionModel(GatewayProvider, string)
Section titled “GatewayExtractionModel(GatewayProvider, string)”public GatewayExtractionModel(GatewayProvider provider, string modelId)Creates an extraction model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
GatewayProvider | |
modelId |
string |
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”public string SpecificationVersion { get; }Specification version. Only v4 is accepted.
Value: string
SupportedFieldTypes
Section titled “SupportedFieldTypes”public IReadOnlyList<string> SupportedFieldTypes { get; }Every field type. Support varies by model, so the Gateway rejects unsupported fields.
Value: IReadOnlyList<string>
Methods
Section titled “Methods”DoExtractAsync(ExtractionModelCall, CancellationToken)
Section titled “DoExtractAsync(ExtractionModelCall, CancellationToken)”public Task<ExtractionModelResult> DoExtractAsync(ExtractionModelCall call, CancellationToken cancellationToken = default)Sends the state and every field in one request.
Parameters
| Name | Type | Description |
|---|---|---|
call |
ExtractionModelCall | |
cancellationToken |
CancellationToken |
Returns: Task<ExtractionModelResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product