Skip to content
providerkit
GitHub

ChatEvent

type ChatEvent = ChatEnvelope &
| {
inputs?: readonly DisplayInput[];
messages: readonly DisplayMessage[];
run: RunInfo;
type: "snapshot";
}
| {
input: DisplayInput;
type: "input";
}
| {
message: DisplayMessage;
type: "message";
}
| {
messageId: string;
part: DisplayPart;
type: "part";
}
| {
attempt?: number;
delta: string;
messageId: string;
partId: string;
type: "text";
}
| {
run: RunInfo;
type: "run";
};

Defined in: react/src/protocol.ts:325