MockStreamResult
Namespace: Vercel.AI.Testing
public sealed class MockStreamResultStream result stored in a scripted list.
Inheritance: object
Constructors
Section titled “Constructors”MockStreamResult(IReadOnlyList<MockStreamChunk>)
Section titled “MockStreamResult(IReadOnlyList<MockStreamChunk>)”public MockStreamResult(IReadOnlyList<MockStreamChunk> chunks)Creates a result with explicit chunks.
Parameters
| Name | Type | Description |
|---|---|---|
chunks |
IReadOnlyList<MockStreamChunk> |
MockStreamResult(string)
Section titled “MockStreamResult(string)”public MockStreamResult(string text)Creates a result that yields text-start, text-delta, and text-end for <code class=“paramref”>text</code>.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Properties
Section titled “Properties”Chunks
Section titled “Chunks”public IReadOnlyList<MockStreamChunk> Chunks { get; }Chunks in order.
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product