Skip to content

MockStreamChunk

Namespace: Vercel.AI.Testing

public sealed class MockStreamChunk

One chunk of a mock language-model stream.

Inheritance: object

View source

public MockStreamChunk(string type, string? id = null, string? delta = null)

Creates a chunk.

Parameters

Name Type Description
type string
id string
delta string

View source

public string? Delta { get; }

Text delta, when Type is text-delta.

Value: string

View source

public string? Id { get; }

Chunk id.

Value: string

View source

public string Type { get; }

Chunk kind.

Value: string

View source

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