EmbeddingModelResponse
Namespace: Vercel.AI.Operations
public sealed class EmbeddingModelResponseOne embedding returned by a model call.
Inheritance: object
Constructors
Section titled “Constructors”EmbeddingModelResponse(IReadOnlyList<double[]>, double?, IReadOnlyList<OperationWarning>?, JsonElement?, ProviderResponse?, bool)
Section titled “EmbeddingModelResponse(IReadOnlyList<double[]>, double?, IReadOnlyList<OperationWarning>?, JsonElement?, ProviderResponse?, bool)”public EmbeddingModelResponse(IReadOnlyList<double[]> embeddings, double? tokens = null, IReadOnlyList<OperationWarning>? warnings = null, JsonElement? providerMetadata = null, ProviderResponse? response = null, bool usageOmitted = false)Creates a model response.
Parameters
| Name | Type | Description |
|---|---|---|
embeddings |
IReadOnlyList<double[]> | |
tokens |
double? | |
warnings |
IReadOnlyList<OperationWarning> | |
providerMetadata |
JsonElement? | |
response |
ProviderResponse | |
usageOmitted |
bool |
Properties
Section titled “Properties”Embeddings
Section titled “Embeddings”public IReadOnlyList<double[]> Embeddings { get; }Vectors in request order.
Value: IReadOnlyList<double[]>
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; }Provider metadata.
Value: JsonElement?
Response
Section titled “Response”public ProviderResponse? Response { get; }Raw response.
Value: ProviderResponse
Tokens
Section titled “Tokens”public double Tokens { get; }Token count. NaN when the provider omitted usage.
Value: double
Warnings
Section titled “Warnings”public IReadOnlyList<OperationWarning> Warnings { get; }Provider warnings. Missing warnings become an empty list.
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product