MockEmbeddingModelV4
Namespace: Vercel.AI.Testing
public sealed class MockEmbeddingModelV4Embedding model v4 test double. Array-backed results are returned in order, starting at the first entry.
Inheritance: object
Constructors
Section titled “Constructors”MockEmbeddingModelV4(string, string, int?, int?, bool, IReadOnlyList<MockEmbedResult>?)
Section titled “MockEmbeddingModelV4(string, string, int?, int?, bool, IReadOnlyList<MockEmbedResult>?)”public MockEmbeddingModelV4(string provider = "mock-provider", string modelId = "mock-model-id", int? maxEmbeddingsPerCall = 1, int? maxInputBytesPerCall = null, bool supportsParallelCalls = false, IReadOnlyList<MockEmbedResult>? doEmbed = null)Creates a model. List results are consumed from the first entry.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
string | |
modelId |
string | |
maxEmbeddingsPerCall |
int? | |
maxInputBytesPerCall |
int? | |
supportsParallelCalls |
bool | |
doEmbed |
IReadOnlyList<MockEmbedResult> |
Properties
Section titled “Properties”DoEmbedCalls
Section titled “DoEmbedCalls”public List<MockEmbedOptions> DoEmbedCalls { get; }Embed calls in order.
Value: List<MockEmbedOptions>
MaxEmbeddingsPerCall
Section titled “MaxEmbeddingsPerCall”public int? MaxEmbeddingsPerCall { get; }Maximum embeddings per call.
Value: int?
MaxInputBytesPerCall
Section titled “MaxInputBytesPerCall”public int? MaxInputBytesPerCall { get; }Maximum input bytes per call.
Value: int?
ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”public string SpecificationVersion { get; }Specification version.
Value: string
SupportsParallelCalls
Section titled “SupportsParallelCalls”public bool SupportsParallelCalls { get; }Whether calls may run in parallel.
Value: bool
Methods
Section titled “Methods”DoEmbedAsync(MockEmbedOptions)
Section titled “DoEmbedAsync(MockEmbedOptions)”public Task<MockEmbedResult> DoEmbedAsync(MockEmbedOptions options)Returns the next scripted embed result.
Parameters
| Name | Type | Description |
|---|---|---|
options |
MockEmbedOptions |
Returns: Task<MockEmbedResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product