Skip to content

ScaleDownProvider

Namespace: Vercel.AI.ScaleDown

public sealed class ScaleDownProvider

ScaleDown’s experimental decision and extraction capabilities. It has no language, embedding, or image models.

Inheritance: object

View source

ScaleDownProvider(ScaleDownProviderSettings?, HttpClient?)

Section titled “ScaleDownProvider(ScaleDownProviderSettings?, HttpClient?)”
public ScaleDownProvider(ScaleDownProviderSettings? options = null, HttpClient? httpClient = null)

Creates a provider. Maps to createScaleDown.

Parameters

Name Type Description
options ScaleDownProviderSettings
httpClient HttpClient

View source

public const string ApiKeyEnvironmentVariable = "SCALEDOWN_API_KEY"

Environment variable for the API key.

Value: string

View source

public const string DecisionProviderId = "scaledown.decision"

Provider id of the decision model.

Value: string

View source

public const string DefaultBaseUrl = "https://api.scaledown.xyz"

Default API origin.

Value: string

View source

public const string ExtractionProviderId = "scaledown.extraction"

Provider id of the extraction model.

Value: string

View source

public static ScaleDownProvider Default { get; }

Provider that reads SCALEDOWN_API_KEY when a request is made. Maps to scaledown and scaleDown.

Value: ScaleDownProvider

View source

public string SpecificationVersion { get; }

Specification version.

Value: string

View source

Create(ScaleDownProviderSettings?, HttpMessageHandler?)

Section titled “Create(ScaleDownProviderSettings?, HttpMessageHandler?)”
public static ScaleDownProvider Create(ScaleDownProviderSettings? options = null, HttpMessageHandler? handler = null)

Creates a provider. Pass a handler from tests. Maps to createScaleDown.

Parameters

Name Type Description
options ScaleDownProviderSettings
handler HttpMessageHandler

Returns: ScaleDownProvider

View source

public DecisionScaleDownModel DecisionModel(string modelId)

Creates a model for ScaleDown’s experimental Decisions API. The id may be one this library does not know yet.

Parameters

Name Type Description
modelId string

Returns: DecisionScaleDownModel

View source

public IEmbeddingModel EmbeddingModel(string modelId)

ScaleDown has no embedding models.

Parameters

Name Type Description
modelId string

Returns: IEmbeddingModel

View source

public ScaleDownExtractionModel ExtractionModel(string modelId)

Creates a model for ScaleDown’s experimental Extract API. The id may be one this library does not know yet. Maps to extractionModel.

Parameters

Name Type Description
modelId string

Returns: ScaleDownExtractionModel

View source

public IImageModel ImageModel(string modelId)

ScaleDown has no image models.

Parameters

Name Type Description
modelId string

Returns: IImageModel

View source

public ILanguageModel LanguageModel(string modelId)

ScaleDown has no language models.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

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