chat-ui / src /lib /types /Message.ts
nsarrazin's picture
nsarrazin HF staff
Backend refactor for streaming endpoints (#444)
e943a05 unverified
raw
history blame
No virus
412 Bytes
import type { MessageUpdate } from "./MessageUpdate";
import type { Timestamps } from "./Timestamps";
import type { WebSearch } from "./WebSearch";
export type Message = Partial<Timestamps> & {
from: "user" | "assistant";
id: ReturnType<typeof crypto.randomUUID>;
content: string;
updates?: MessageUpdate[];
webSearchId?: WebSearch["_id"]; // legacy version
webSearch?: WebSearch;
score?: -1 | 0 | 1;
};