Skip to content

ParallelProvider

Namespace: Vercel.AI.Parallel

public sealed class ParallelProvider

Parallel’s experimental web-grounded decision capability. It has no language, embedding, or image models. Maps to ParallelProvider.

Inheritance: object

View source

ParallelProvider(ParallelProviderSettings?, HttpClient?)

Section titled “ParallelProvider(ParallelProviderSettings?, HttpClient?)”
public ParallelProvider(ParallelProviderSettings? options = null, HttpClient? httpClient = null)

Creates a provider. Maps to createParallel.

Parameters

Name Type Description
options ParallelProviderSettings
httpClient HttpClient

View source

public const string ApiKeyEnvironmentVariable = "PARALLEL_API_KEY"

Environment variable for the API key.

Value: string

View source

public const string DecisionProviderId = "parallel.decision"

Provider id of the decision model.

Value: string

View source

public const string DefaultBaseUrl = "https://api.parallel.ai/v1"

Default API base URL.

Value: string

View source

public static ParallelProvider Default { get; }

Provider that reads PARALLEL_API_KEY when a request is made. Maps to parallel.

Value: ParallelProvider

View source

public string SpecificationVersion { get; }

Specification version.

Value: string

View source

Create(ParallelProviderSettings?, HttpMessageHandler?)

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

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

Parameters

Name Type Description
options ParallelProviderSettings
handler HttpMessageHandler

Returns: ParallelProvider

View source

public DecisionParallelModel DecisionModel(string modelId)

Creates a web-grounded decision model. The id may be a mode this library does not know yet.

Parameters

Name Type Description
modelId string

Returns: DecisionParallelModel

View source

public IEmbeddingModel EmbeddingModel(string modelId)

Parallel has no embedding models.

Parameters

Name Type Description
modelId string

Returns: IEmbeddingModel

View source

public IImageModel ImageModel(string modelId)

Parallel has no image models.

Parameters

Name Type Description
modelId string

Returns: IImageModel

View source

public ILanguageModel LanguageModel(string modelId)

Parallel 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