Skip to content

EmbedStartEvent

Namespace: Vercel.AI.Operations

public sealed class EmbedStartEvent

Start event for embed and embedMany.

Inheritance: object

View source

EmbedStartEvent(string, string, IReadOnlyDictionary<string, object?>, string, string, EmbedEventValue<string, IReadOnlyList<string>>, int, IReadOnlyDictionary<string, string>, JsonElement?, int?)

Section titled “EmbedStartEvent(string, string, IReadOnlyDictionary<string, object?>, string, string, EmbedEventValue<string, IReadOnlyList<string>>, int, IReadOnlyDictionary<string, string>, JsonElement?, int?)”
public EmbedStartEvent(string callId, string operationId, IReadOnlyDictionary<string, object?> runtimeContext, string provider, string modelId, EmbedEventValue<string, IReadOnlyList<string>> value, int maxRetries, IReadOnlyDictionary<string, string> headers, JsonElement? providerOptions, int? dimensions = null)

Creates a start event.

Parameters

Name Type Description
callId string
operationId string
runtimeContext IReadOnlyDictionary<string, object>
provider string
modelId string
value EmbedEventValue&lt;string, IReadOnlyList&lt;string&gt;&gt;
maxRetries int
headers IReadOnlyDictionary<string, string>
providerOptions JsonElement?
dimensions int?

View source

public string CallId { get; }

Correlates start and end.

Value: string

View source

public int? Dimensions { get; }

Requested output dimensions, when specified.

Value: int?

View source

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

Headers sent to the model.

Value: IReadOnlyDictionary<string, string>

View source

public int MaxRetries { get; }

Resolved retry limit.

Value: int

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string OperationId { get; }

ai.embed or ai.embedMany.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

public JsonElement? ProviderOptions { get; }

Provider options.

Value: JsonElement?

View source

public IReadOnlyDictionary<string, object?> RuntimeContext { get; }

Caller runtime context.

Value: IReadOnlyDictionary<string, object>

View source

public EmbedEventValue<string, IReadOnlyList<string>> Value { get; }

A string for embed, or the value list for embedMany.

Value: EmbedEventValue&lt;string, IReadOnlyList&lt;string&gt;&gt;

View source

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