Skip to content

EmbedEventValue<TOne, TMany>

Namespace: Vercel.AI

public sealed class EmbedEventValue<TOne, TMany>

A single item for embed or a list for embedMany, as carried by embed events.

Type parameters

Name Description
TOne The single item type.
TMany The list type.

Inheritance: object

View source

public bool IsMany { get; }

True for embedMany.

Value: bool

View source

public TMany? Many { get; }

The list. Default when IsMany is false.

Value: TMany

View source

public TOne? One { get; }

The single item. Default when IsMany is true.

Value: TOne

View source

public static EmbedEventValue<TOne, TMany> FromMany(TMany values)

Wraps the embedMany list.

Parameters

Name Type Description
values TMany

Returns: EmbedEventValue<TOne, TMany>

View source

public static EmbedEventValue<TOne, TMany> FromOne(TOne value)

Wraps the single embed item.

Parameters

Name Type Description
value TOne

Returns: EmbedEventValue<TOne, TMany>

View source

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