chat-ui / src /lib /types /MessageUpdate.ts
nsarrazin's picture
nsarrazin HF staff
Add support for tgi multimodal models (#531)
0e5c445 unverified
raw history blame
No virus
802 Bytes
import type { WebSearchSource } from "./WebSearch";
export type FinalAnswer = {
type: "finalAnswer";
text: string;
};
export type TextStreamUpdate = {
type: "stream";
token: string;
};
export type AgentUpdate = {
type: "agent";
agent: string;
content: string;
binary?: Blob;
};
export type WebSearchUpdate = {
type: "webSearch";
messageType: "update" | "error" | "sources";
message: string;
args?: string[];
sources?: WebSearchSource[];
};
export type StatusUpdate = {
type: "status";
status: "started" | "pending" | "finished" | "error" | "title";
message?: string;
};
export type ErrorUpdate = {
type: "error";
message: string;
name: string;
};
export type MessageUpdate =
| FinalAnswer
| TextStreamUpdate
| AgentUpdate
| WebSearchUpdate
| StatusUpdate
| ErrorUpdate;