Skip to content

EmbeddingModelCall

Namespace: Vercel.AI.Operations

public sealed class EmbeddingModelCall

Arguments for one doEmbed call.

Inheritance: object

View source

EmbeddingModelCall(IReadOnlyList<string>, IReadOnlyDictionary<string, string>, JsonElement?, CancellationToken, int?)

Section titled “EmbeddingModelCall(IReadOnlyList<string>, IReadOnlyDictionary<string, string>, JsonElement?, CancellationToken, int?)”
public EmbeddingModelCall(IReadOnlyList<string> values, IReadOnlyDictionary<string, string> headers, JsonElement? providerOptions, CancellationToken cancellationToken, int? dimensions = null)

Creates a model call.

Parameters

Name Type Description
values IReadOnlyList<string>
headers IReadOnlyDictionary<string, string>
providerOptions JsonElement?
cancellationToken CancellationToken
dimensions int?

View source

public CancellationToken CancellationToken { get; }

Cancellation token.

Value: CancellationToken

View source

public int? Dimensions { get; }

Requested output dimensions. Null when the caller did not ask for any.

Value: int?

View source

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

Headers, including the user-agent suffix.

Value: IReadOnlyDictionary<string, string>

View source

public JsonElement? ProviderOptions { get; }

Provider options for this chunk.

Value: JsonElement?

View source

public IReadOnlyList<string> Values { get; }

Values in this call.

Value: IReadOnlyList<string>

View source

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