Interface AgenticaTextEvent<Role>

interface AgenticaTextEvent<
    Role extends "assistant"
    | "user" = "assistant" | "user",
> {
    join: () => Promise<string>;
    role: Role;
    stream: AsyncGenerator<string, undefined, undefined>;
    toHistory: () => AgenticaTextHistory;
    toJSON: () => IAgenticaEventJson.IText;
    type: "text";
}

Type Parameters

  • Role extends "assistant" | "user" = "assistant" | "user"

Hierarchy

  • AgenticaEventBase<"text">
    • AgenticaTextEvent

Properties

join: () => Promise<string>
role: Role
stream: AsyncGenerator<string, undefined, undefined>
toHistory: () => AgenticaTextHistory
type: "text"

Discriminator type.