Skip to content

VoyageEmbeddingResult

Namespace: Vercel.AI.Voyage

public sealed class VoyageEmbeddingResult

Voyage embedding result, including the raw response.

Inheritance: object

View source

VoyageEmbeddingResult(IReadOnlyList<float[]>, int, IReadOnlyDictionary<string, string>, JsonElement)

Section titled “VoyageEmbeddingResult(IReadOnlyList<float[]>, int, IReadOnlyDictionary<string, string>, JsonElement)”
public VoyageEmbeddingResult(IReadOnlyList<float[]> embeddings, int tokens, IReadOnlyDictionary<string, string> headers, JsonElement body)

Creates an embedding result.

Parameters

Name Type Description
embeddings IReadOnlyList<float[]>
tokens int
headers IReadOnlyDictionary<string, string>
body JsonElement

View source

public JsonElement Body { get; }

Raw response body.

Value: JsonElement

View source

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

Vectors in input order.

Value: IReadOnlyList<float[]>

View source

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

Response headers.

Value: IReadOnlyDictionary<string, string>

View source

public int Tokens { get; }

Token count. Zero when the provider omits usage.

Value: int

View source

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