chat-ui / src /lib /types /ConversationStats.ts
coyotte508's picture
coyotte508 HF staff
✨ Add stats on conversations (#828)
634bd69 unverified
raw history blame
No virus
378 Bytes
import type { Timestamps } from "./Timestamps";
export interface ConversationStats extends Timestamps {
date: {
at: Date;
span: "day" | "week" | "month";
field: "updatedAt" | "createdAt";
};
type: "conversation" | "message";
/** _id => number of conversations/messages in the month */
distinct: "sessionId" | "userId" | "userOrSessionId" | "_id";
count: number;
}