MockEmbeddingModelV3
Namespace: Vercel.AI.Testing
public sealed class MockEmbeddingModelV3Embedding model v3 test double. Array-backed results are returned in order, starting at the first entry.
Inheritance: object
Constructors
Section titled “Constructors”MockEmbeddingModelV3(string, string, int?, bool, IReadOnlyList<MockEmbedResult>?, Func<MockEmbedOptions?, Task<MockEmbedResult>>?)
Section titled “MockEmbeddingModelV3(string, string, int?, bool, IReadOnlyList<MockEmbedResult>?, Func<MockEmbedOptions?, Task<MockEmbedResult>>?)”public MockEmbeddingModelV3(string provider = "mock-provider", string modelId = "mock-model-id", int? maxEmbeddingsPerCall = 1, bool supportsParallelCalls = false, IReadOnlyList<MockEmbedResult>? doEmbed = null, Func<MockEmbedOptions?, Task<MockEmbedResult>>? embed = null)Creates a model. List results are consumed from the first entry.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
string | |
modelId |
string | |
maxEmbeddingsPerCall |
int? | |
supportsParallelCalls |
bool | |
doEmbed |
IReadOnlyList<MockEmbedResult> | |
embed |
Func<MockEmbedOptions, Task<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?
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