Skip to content

MockStreamResult

Namespace: Vercel.AI.Testing

public sealed class MockStreamResult

Stream result stored in a scripted list.

Inheritance: object

View source

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>

View source

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

View source

public IReadOnlyList<MockStreamChunk> Chunks { get; }

Chunks in order.

Value: IReadOnlyList<MockStreamChunk>

View source

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