Skip to content

EmbeddingResult

Namespace: Vercel.AI.Provider

public sealed class EmbeddingResult

Embedding vector result.

Inheritance: object

View source

EmbeddingResult(IReadOnlyList<float[]>, int?, IReadOnlyList<CallWarning>?, EmbeddingResponseInfo?)

Section titled “EmbeddingResult(IReadOnlyList<float[]>, int?, IReadOnlyList<CallWarning>?, EmbeddingResponseInfo?)”
public EmbeddingResult(IReadOnlyList<float[]> embeddings, int? tokens, IReadOnlyList<CallWarning>? warnings = null, EmbeddingResponseInfo? response = null)

Creates an embedding result.

Parameters

Name Type Description
embeddings IReadOnlyList<float[]>
tokens int?
warnings IReadOnlyList<CallWarning>
response EmbeddingResponseInfo

View source

public IReadOnlyList<float[]> Embeddings { get; }

One vector per input value.

Value: IReadOnlyList<float[]>

View source

public EmbeddingResponseInfo? Response { get; }

Raw HTTP response of this call, when the provider reports it.

Value: EmbeddingResponseInfo

View source

public int? Tokens { get; }

Token usage, when the provider reports it.

Value: int?

View source

public IReadOnlyList<CallWarning> Warnings { get; }

Warnings of this call.

Value: IReadOnlyList<CallWarning>

View source

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